Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: How do I ask "if NOT" in shell? Message-ID: <3836@solo9.cs.vu.nl> Date: 26 Oct 89 19:14:40 GMT References: <63720010@hpl-opus.HP.COM> <1989Oct26.041244.28325@sobmips.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 24 roe@sobmips.UUCP (r.peterson) writes: \... \true && { \ echo true \} || { \ echo false \} \ \and it functions fine. Change true && to false && and it prints false \correctly as well. The abovementioned method has different characteristics: test-command && { if-clause } || { else-clause } ...will execute the else-clause if the test-command *or* the if-clause fails, which might not be what you want. -- A symbolic link is a POINTER to a file, | Maarten Litmaath @ VU Amsterdam: a hard link is the file system's GOTO. | maart@cs.vu.nl, mcsun!botter!maart