scsh-users
[Top] [All Lists]

Re: Why we program in scsh

To: scsh-news@martigny.ai.mit.edu
Subject: Re: Why we program in scsh
From: chet@watson.ibm.com (Chet Murthy)
Date: 4 Jun 1997 03:21:21 GMT
Organization: IBM_Research
In article <xm7zpt7wbac.fsf@fuseki.aa.ans.net>,
michael shiplett  <walrus@ans.net> wrote:
>Olin Shivers <shivers@lambda.ai.mit.edu> writes:
>
>> Every now and then, a friend of mine sends me choice bits of Unix
>> scripting which I occasionally translate into scsh for comparison.
>
>> ;;; Copy IN to OUT, prefixing each line with a timestamp,
>
>[awk and scsh exampes omitted]
>
>The interesting question isn't why the close() is necessary, it's why
>your friend doesn't use GNU awk, which makes the exercise into a
>one-liner and does not require an external program.
>
>    gawk '{print strftime("%b %e %T"), $0}'
>
>michael

Errr ... or, a one-liner in (shriek!) Perl?

Of course, Perl5 is just an alternate, pleasing/exasperating syntax
for Scheme, sooo ....

--chet--
P.S. And amazingly enough, I actually believe what I wrote!


<Prev in Thread] Current Thread [Next in Thread>