| To: | scsh-news@martigny.ai.mit.edu |
|---|---|
| Subject: | Re: Why we program in scsh |
| From: | michael shiplett <walrus@ans.net> |
| Date: | 03 Jun 1997 18:51:07 -0400 |
| Organization: | ANS |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | regular expression packages, Jim Blandy |
|---|---|
| Next by Date: | Re: Why we program in scsh, Sean Doran |
| Previous by Thread: | Re: Why we program in scsh, Shriram Krishnamurthi |
| Next by Thread: | Re: Why we program in scsh, Chet Murthy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |