Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am having the output like this A 1

Status
Not open for further replies.

CALYAN

Programmer
Apr 23, 2001
39
US
I am having the output like this
AAO|VE|LA|21|
ABE|US|US|110|
ABJ|CI|AF|289|
ABQ|US|US|62|
ABT|SA|ME|174|
ABZ|GB|UK|437|
ACA|MX|MX|91|
ACC|GH|AF|334|
ADA|TR|EU|112|


I want the report like this

Area code Count code Reg code Count
AAO VE LA 21

how to do with awk?
 
Try something like this:
Code:
awk -F'|' 'BEGIN{
printf "Area code    Count code  Reg code   Count\n"
fmt="%3s             %2s          %2s    %5d\n"}
{printf fmt,$1,$2,$3,$4}
' /path/to/file

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top