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!
|