Jul 21, 2009 #1 Awksome Programmer Joined Jul 17, 2009 Messages 11 Location US I have a file with a header record. I want to ignore reading the header record using AWK. Please advise.
I have a file with a header record. I want to ignore reading the header record using AWK. Please advise.
Jul 21, 2009 #2 p5wizard IS-IT--Management Joined Apr 18, 2005 Messages 3,165 Location BE [tt]awk '(NR>1){print}' /path/to/your/file_with_headers[/tt] HTH, p5wizard Upvote 0 Downvote
Jul 21, 2009 Thread starter #3 Awksome Programmer Joined Jul 17, 2009 Messages 11 Location US Thanks for the response! but I have 2 files and I am processing the files to compare values. Upvote 0 Downvote
Jul 21, 2009 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR Have a look at the FNR builtin variable in your awk documentation. Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Have a look at the FNR builtin variable in your awk documentation. Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Jul 27, 2009 #5 p5wizard IS-IT--Management Joined Apr 18, 2005 Messages 3,165 Location BE It pays to specify your complete problem in your original post... Just use FNR instead of NR then as hinted by PHV. HTH, p5wizard Upvote 0 Downvote
It pays to specify your complete problem in your original post... Just use FNR instead of NR then as hinted by PHV. HTH, p5wizard
Jul 27, 2009 #6 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU This is probably related to this thread: http://www.tek-tips.com/viewthread.cfm?qid=1559710&page=1 Annihilannic. Upvote 0 Downvote
This is probably related to this thread: http://www.tek-tips.com/viewthread.cfm?qid=1559710&page=1 Annihilannic.