
09-02-2008
|
|
Shell programmer, author
|
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
|
|
Code:
awk '
NR==1 { var1=$1; var3=$3; next }
{ var2 += $2 }
END { print var1" "var2" "var3 }' filename
I suspect that what you really want is more complex than this, If so, you'll probably have to describe your input file more completely.
|