SPUG:Best One-Liners and Scripts for UNIX
Brian Hatch
spug at ifokr.org
Thu Apr 17 09:07:16 CDT 2003
> > fields=$1;
> > shift;
> > $PERL5 "-F$delim" -ape 'chomp @F; $_=join(" ",grep /./, @F['$fields'])."\n"' $@
> > }
>
> I can see here how $fields gets set, in the next example
> I don't see how $fields gets set, do you?
Whoops - my bad. Yeah, you still need that bit of shell.
function sp {
fields=$1
shift;
$PERL5 -ape 'chomp @F; $_=join(" ",grep /./, @F['$fields'])."\n"' $@
}
--
Brian Hatch "Beep! Beep! Nipple bus!
Systems and All aboard!"
Security Engineer --Bree to Reegen (4 mos)
http://www.ifokr.org/bri/
Every message PGP signed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/spug-list/attachments/20030417/0da1c693/attachment.bin
More information about the spug-list
mailing list