[GLLUG] Shell Scripting
Darrel Ray Clute, III
darrel_clute at yahoo.com
Tue Jul 22 06:00:26 EDT 2003
Hi All!
I am trying to write a shell script that will test for
the existance of a file with a specific extension.
For example:
if [ -f /home/darrel/*.jpg ]; then
do stuff here...
fi
It works great if I have it look for a specific file,
but will not work with any type of quoting fir the *.
I've also tried the 'test' command, but it doesn't
like multiple files either.
Any suggestions or hints as to where to go from here?
Thanks,
--
Darrel Clute, CCNP/CCDP
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/B d+ s+: a--- C++++ UL++++ P+ L+++ E--- W++ N+ o+ K- w--- O-- M V-- PS
PE Y+ PGP- t+ 5+ X+ R tv+ b+ DI+ !D G+ e h! r-- y-
------END GEEK CODE BLOCK------
To Decipher Code - http://www.ebb.org/ungeek/
To Learn About Code - http://www.geekcode.com/geek.html
More information about the linux-user
mailing list