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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning columns into rows in awk?

Status
Not open for further replies.

gargamel100

Technical User
Oct 25, 2006
31
CZ
Hi people,

this may be very easy or not but I can not solve this myself. Output of one my awk script is as follow

case 1:
9440000 0
9004407 9
9000668 11
9000669 20
9001740 935


but I wish I can make it using awk ( to pipe this to some another awk script ) to look like
case 2:

9440000 9004407 9000668 9000669 9001740
0 ----------- 9 ----------- 11 ---------- 20 --------- 935

Without ----- between numbers.


My script work ok but is it possible to make output from case 1 to look as case 2.

If someone know please write it down.
Thanks in advance
 
Or how output case1 make using awk to look as case2.
I tried some variations on theme ....awk '{print "\n\t" $1}'

but without success .....

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top