Re: shell game
Gary Turner wrote:
>Drew Cohan wrote:
>>Using a bash shell script (/bin/sh), I need to know how to check to see
>>if certain files exist in a directory, as in, "Are there any jpegs in
> ls *.jpg > /dev/null 2>&1 # tested command--output is
> # superfluous
> [ $? eq 0 ] # did last command succeed?
Ack! Make that "-eq" Sorry about that.
> then echo "yes" # shout hooray
> else echo "no" # tears in your beer
>It ain't so much what you don't know that gets you in trouble---
>it's what you do know that ain't so.--unk
Nielsen's First Law of Computer Manuals:
People don't read documentation voluntarily.