question-- Bourne (and C) SHELL

Arturo Perez arturo at humming.UUCP
Fri Aug 15 00:12:45 AEST 1986


Here's something I've wanted to do for a while but I can't seem to find the
way to do it.

In the csh you can do something like

ls foo
if (! $status) then
   echo "foo exists"
endif

The  key  thing  here  is  the  ability  to NOT the value of status. How is
this similar thing done in Bourne shell.

if ! ls foo
then
	echo foo does not exist
fi

In  summary,  how can I take the logical NOT of a command's return value in
the Bourne shell (which is God's gift to U**X :-)?
-- 
"Life is but a dream" - Lope de Vega
    "...for some and a NIGHTMARE for others!" Merlin, "Excalibur", the movie
Disclaimer?  What disclaimer?  I can back everything up with as much 
drivel as you like!



More information about the Comp.unix.wizards mailing list