quoted
quoted
quoted
quoted
"DG" == David Greaves [off-list ref] writes:
quoted
quoted
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