[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell Golf



On Thu, May 08, 2003 at 11:55:45AM -0500, Danny Sauer wrote:
> Steven Pritchard wrote:
> >On Thu, May 08, 2003 at 11:10:13AM -0500, Danny Sauer wrote:
> >>and use "warn" instead of print. :)
> >
> >That's not going to quite give the same output either.  :-)
> 
> Same output, just on STDERR instead of STDOUT.

Ah, of course...  There's a linefeed in the output, so it doesn't tack
on the "at -e line 1, ..."  Sorry, my mistake.

> perl -F. -ane'$x=@F;@n=($x,$ARGV,$_)if@F>$n[0];END{warn"@n"}' *.pl

Definitely more obfuscated, but that's the same length as my last one
with the whitespace after -e removed.  :-)

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7360             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.