View Single Post
Join Date: Jun 2007
Posts: 11
Reputation: vrgurav is an unknown quantity at this point 
Solved Threads: 1
vrgurav vrgurav is offline Offline
Newbie Poster

Re: Best way to skip first line?

 
0
  #5
Jun 19th, 2007
Originally Posted by rusman View Post
I need to read in a list from a file, but I want to always ignore/skip the first line of this file.

Right now I'm just cat'ing the file and awk'ing the first column as that's all I need. However, this will also give me the first column of the first line which I do not want.

The first entry will probably be the same value everytime, so I could put a test in to skip that, but wondered if there was another quicker way and so that I'm not always testing every value.

Thanks!
tail +n filename

eg: tail +2 filename
Reply With Quote