How do I ask "if NOT" in shell?

M.R.Murphy mrm at sceard.Sceard.COM
Wed Oct 25 01:14:01 AEST 1989


>kirkaas at oahu.cs.ucla.edu (paul kirkaas) writes:
>How can one say "if not" in a shellscript; that is, execute the body of
>the "then" only if the argument of "if" returns a non-zero exit status?

Might be a Good Thing to look up how && and || work, especially with { and }.
--
Mike Murphy  Sceard Systems, Inc.  544 South Pacific St. San Marcos, CA  92069
mrm at Sceard.COM        {hp-sdd,nosc,ucsd,uunet}!sceard!mrm      +1 619 471 0655



More information about the Comp.unix.questions mailing list