The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 1 of 1
Search took
0.01
seconds.
Search:
Posts Made By:
mjnman
Forum:
UNIX for Dummies Questions & Answers
08-28-2012
9
AWK: add and sum line in output
2,814
Posted By
RudiC
This acts exactly as you have specified:awk ...
This acts exactly as you have specified:awk 'BEGIN {f[1,1]="ONE"; f[2,1]="TWO"; OFS="\t"}
/^sd[1-8]/ {for (i=2;i<NF;i++) f[1,i]+=$i}
/^ssd[23][0-9]/ {for (i=2;i<NF;i++)...
Showing results 1 to 1 of 1
Member Badges and Information Modal
×