Path: utzoo!attcan!uunet!snorkelwacker!mit-eddie!rutgers!mcnc!rti!dg-rtp!dg-rtp.dg.com!eliot From: eliot@dg-rtp.dg.com (Topher Eliot) Newsgroups: comp.unix.shell Subject: Re: bourne shell query Message-ID: <1990Sep6.140844.530@dg-rtp.dg.com> Date: 6 Sep 90 14:08:44 GMT References: <26DC6447.15922@maccs.dcss.mcmaster.ca> <8446@orca.wv.tek.com> Sender: usenet@dg-rtp.dg.com (Usenet Administration) Reply-To: eliot@dg-rtp.dg.com Organization: Data General Corporation, Research Triangle Park, NC Lines: 24 In article , scott@tab29.larc.nasa.gov (Scott Yelich) writes: |> |> Sometimes people program for the ART of it (Oh no! Did I say that?) |> |> for instance, which do you prefer? Which do you consider better form? ... |> 2) test "$1" = "$2" && echo "Yeas!" || echo "No-way!" ... |> 4) eval ${1:+'echo "Yup!"'} |> I prefer 2 and 4.... My wife and I have for a long time had an inside joke: "I can't understand it. It must be Art." I never thought I'd apply it to a shell script... -- Topher Eliot Data General Corporation eliot@dg-rtp.dg.com 62 T. W. Alexander Drive {backbone}!mcnc!rti!dg-rtp!eliot Research Triangle Park, NC 27709 (919) 248-6371 Obviously, I speak for myself, not for DG.