Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] if [[ -e *.TXT ]] ; then


Hi,

just a quicky if someone could help.

how do I check that a file with a particular extension exists in a directory
in a shell script.

eg:

if [[ -e *.TXT ]] ; then

Using a wildcard does not appear to work.

thanks in advance

alister


Alister Waller (B.Comp CQU)
Support Manager/Director
Roadtech Systems Ltd
Phone: 02 98073516 Fax: 02 98085294
www.roadtechsystems.com.au