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

How to ignore the header record?

Status
Not open for further replies.

Awksome

Programmer
Jul 17, 2009
11
0
0
US
I have a file with a header record. I want to ignore reading the header record using AWK.

Please advise.
 
[tt]awk '(NR>1){print}' /path/to/your/file_with_headers[/tt]


HTH,

p5wizard
 
Thanks for the response!

but I have 2 files and I am processing the files to compare values.
 
Have a look at the FNR builtin variable in your awk documentation.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It pays to specify your complete problem in your original post... Just use FNR instead of NR then as hinted by PHV.

HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top