![]() |
| ||
| Best way to skip first line? 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! |
| ||
| Re: Best way to skip first line? more +2 <file> |
| ||
| Re: Best way to skip first line? Or use sed |
| ||
| Re: Best way to skip first line? tail +n <filename> to start from second line eg : tail +2 <filename> Hope this will solve your query |
| ||
| Re: Best way to skip first line? Quote:
eg: tail +2 filename |
| ||
| Re: Best way to skip first line? Thanks all, I used more as that was the first response and it worked!! |
| ||
| Re: Best way to skip first line? Here is what I did as the "fastest" way to skip the first line. Fastest=best for my situation. #include <unistd.h> |
| ||
| Re: Best way to skip first line? Hey there, Did I miss: Quote:
, Mike |
| All times are GMT -4. The time now is 9:13 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC