Chip Salzenberg on Thu, 14 Aug 2003 14:15:15 -0400


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

Re: "How did I live without this?"


I like it.  Strangely enough, I already have a /usr/local/bin/f:

================================================================
#!/usr/bin/perl -lan
BEGIN {
    @n = @ARGV ? (split /,/, shift) : -1;
    for (@n) { $_-- if $_ > 0 }
}
@f = grep { defined } @F[@n];
print "@f" if @f;
================================================================

Two diffs in function.  It supports multiple fields:

   f 1,3,5 /some/file

And it defaults to the last column, which is what you really want
amazingly often.
-- 
Chip Salzenberg               - a.k.a. -               <chip@pobox.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**