Maybe something like...
if [ "`ls *.php`X" = "X" ]; then
# no *.php
fi
That may print out an error to stderr if there's no files. Not sure.
I wouldn't use 'locate' since that checks the locate database (which is only rebuilt periodically) rather than looking at actual (current) directory entries.
|