<quote who="Alister Waller">

> how do I check that a file with a particular extension exists in a directory
> in a shell script.
> 
> eg:
> 
> if [[ -e *.TXT ]] ; then

How about...

if [ ! -z $(/bin/ls -1 | grep -c .TXT$) ]; then echo pants; fi

- Jeff

-- 
   She said she loved my mind, though by most accounts I had already lost   
                                    it.                                     

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to