Path: utzoo!utgpu!cs.utexas.edu!sdd.hp.com!wuarchive!ukma!psuvax1!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: alt.sources.d Subject: Re: NON-SOURCE POSTINGS CONSIDERED HARMFUL! Message-ID: <24078:Jan2516:52:2591@kramden.acf.nyu.edu> Date: 25 Jan 91 16:52:25 GMT References: <1991Jan17.224403.16050@convex.com> <18354:Jan2415:53:5391@kramden.acf.nyu.edu> <1991Jan25.090627.14302@convex.com> Organization: IR Lines: 24 In article <1991Jan25.090627.14302@convex.com> tchrist@convex.COM (Tom Christiansen) writes: > :Now what is easier to maintain: a simple 7-line shell script, or a > :28-line perl script? > You're comparing apples with windmills. Your script doesn't at > all do the same thing. Yes, it does, except for the difference I noted (and a few arbitrary limitations that will never come up in practice). For example, on this machine, /bin/cat and /usr/bin/cat are the same file. Your perl script takes several lines of tests to make sure that it doesn't report cat. My script takes one line to do the same thing. On this machine, /bin/mail and /usr/ucb/mail are quite different. So your script reports them. Mine does too. The difference is that mine just says ``mail'' while yours also points out where the conflicting versions are. Naturally, I think that it's the job of ``which'' to do the latter, but it's just a 2-line change to the shell script if you care. Why are you dodging the question, Tom? Does it hurt your ego to see that something is much more easily done with standard tools than with perl? ---Dan