From: Junio C Hamano Date: Sat, 14 May 2005 09:01:49 GMT Subject: Re: [PATCH] Ignore file filter Message-ID: <7vy8ai2nb6.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <4285B6A8.4080309@dgreaves.com> >>>>> "DG" == David Greaves writes: >>> if [[ $file =~ $patt ]]; then >> >> I'm sorry but this is really nothing my bash-2.05.0(1)-release supports. DG> OK DG> I don't know how to do that. Is that regexp or shell glob? If regexp, expr is your friend, like this: if expr "$file" : "$patt" >/dev/null; then For a glob: patt='?.sh' file=1.sh case "$file" in $patt) echo Yeah ;; *) echo No ;; esac