Thread
:
In a shell script.. how do I test if any *.php exist?
View Single Post
03-31-2009, 05:28 AM
rowan
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by
Pixelbucks Eric
if [ -f *.php ]; then echo "PHP files present"; fi
Mind you, the spaces need to be there.
Also, you could do:
if [ ! -f *.php ]; then echo "no PHP files present"; fi
Might also need to quote "*.php"
rowan
View Public Profile
Visit rowan's homepage!
Find More Posts by rowan