Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

append column and row header to a file in awk script.

$
0
0
Hi! Is there a way to append column and row header to a file in awk script.
For example if I have
Code:

Jane  F  39  manager
Carlos M  40  system administrator
Sam    F  20  programmer

and I want it to be

Code:

# name  gend  age  occup
1 Jane    F      39    manager
2 Carlos  M      40    system administrator
3 Sam      F        20    programmer

I just have no ideas... :wall:
Thanks in advance


Moderator's Comments:
Please use code tags next time for your code and data.

Viewing all articles
Browse latest Browse all 16232

Trending Articles