[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Q: Bash: test for existence of any file matching a glob pattern.
Of course if you were using zsh then you could just use:
if [[ -z "$( print *.h(N) )" ]] ; then
print no dot h files . . .
else
frobnicate *.h
fi
The "(N)" suffix turns on nullglob for a single expansion.
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U