Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] my next stupid question


Malcolm Tredinnick <malcolm@xxxxxxxxxxxxxxxxx> wrote:

> A fairly common idiom for this is:

> fileList=`echo *.TXT`
> if [ "$fileList" != '*' ]; then
>    ...(insert other stuff here)
> fi

A more paranoid version would be:

set *.TXT
if [ -e "$1" ]; then
	...Do stuff with "$@"
fi
-- 
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt