Quote:
Originally Posted by trey85stang
Is there a way to tell awk to ignore the first 11 lines of a file?? example, I have a csv file with all the heading information in the first lines. I want to split the file into 5-6 different files but I want to retain the the first 11 lines of the file.
As it is now I run this command:
Code:
cat something.csv | nawk '$2 = /servername/' >> something-new.csv
It cuts off the first 11 lines... Right now im just doing two steps to create the file running sed 11q > something-new.csv then running the above command appending something-new.csv. Is there a way to do that with just nawk so I can eliminate the sed command?
|
Maybe like this:
cat -n something| awk '$1>11 && (the conditions you like)
cat -n adds to the first coloumn the number of line.
Regards