For Programmers: Free Programming Magazines  


Home > Archive > AWK > March 2004 > this gen.sh can print next line









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author this gen.sh can print next line
Ario

2004-03-19, 8:24 pm

awk '{printf("/%s/ {count[\"%s\"]++;print;getline;print;}\n",$0,$0)}'
trace.txt > log.awk
echo "END { print \"***SUMMARY***\"; " >> log.awk
awk '{printf("printf (\"Count of %s=%s\\n\",count[\"%s\"]);\n",$0,"%d",$0)}'
trace.txt >> log.awk
echo "}" >> log.awk


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com