Testing for non-empty wildcards
Shankar Unni
shankar at hpclscu.HP.COM
Tue Dec 6 07:34:31 AEST 1988
> foreach i (sccs/p.*)
> set file = something_horrible
> delta sccs/s.$file
> get sccs/s.$file
> end
....
>
> set nonomatch
> set a = sccs/p.*
> if ( "$a" == "sccs/p.*" ) exit 0
>
Try something a little nicer (if a little more cpu-expensive):
find sccs -name 'p.*' -exec something_or_other
or
find sccs -name 'p.*' -print | while read file
do
# list of commands on $file
done
(/bin/sh or /bin/ksh example)
---
Shankar.
More information about the Comp.unix.wizards
mailing list