On Fri, Jan 07, 2000 at 04:37:22PM +1100, Ken Yap wrote:
>       #!/usr/bin/perl -w
> 
>       while (<>) {
>               $total += (split)[1] if ($. >= 3 and $. <= 6);
>       }
>       print "$total\n";


bah - the awk script would have run several times before perl could
even start up


expr 0 `sed -n '3,6s/^.*\([0-9]\+\)$/+ \1/p' < file`

-- 
 - Gus
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to