On Sat, 2004-11-06 at 23:10 +0000, Thomas Adam wrote:
>  --- Silvan Villiger <[EMAIL PROTECTED]> wrote: 
> 
> > I've started to learn scripting in linux. But I have some troubles 
> > understandig the redirection of the streams. I tried to test whether a 
> > directory already exists using the ls command (didn't find a bether 
> > solution) and whenever ls doesn't find such a directory it writes an 
> 
> [ -d /some/directory ] && echo "directory exists" >&2 || echo "nope. does
> not exist" >&2

A more explicit way to write this would be:

if [ -d /some/directory ];
then
   echo "directory exists"
else
   echo "nope. does not exist"
fi

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

Alles touristen und non-technischen looken peepers! Das
machinkontrol is nicht for gefengerpoken und mittengrabben.
Oderwise is easy schnappen der springenverk, blowenfus,
undpoppencorken mit spitzensparken. Der machine is diggen by
experten only. Is nicht fur geverken by das dumpkopfen. Das
rubber necken sightseenen keepen das cotton-picken hands in das
pockets. So relaxen, und vatchen das blinkenlights.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to