Aug 12, 2004 #1 dmjoen Technical User Jul 26, 2001 31 US Hi, I need to delete several lines from a file that fall before a certain line in the file. For example: line 1 line 2 line 3 line 4 . . . . STARTUP I need to delete all of the lines before the line that contains STARTUP. Any help appreciated. Thanks
Hi, I need to delete several lines from a file that fall before a certain line in the file. For example: line 1 line 2 line 3 line 4 . . . . STARTUP I need to delete all of the lines before the line that contains STARTUP. Any help appreciated. Thanks
Aug 12, 2004 1 #2 PHV MIS Nov 8, 2002 53,708 FR Something like this ? awk '/STARTUP/{++flg}flg' /path/to/input >output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
Something like this ? awk '/STARTUP/{++flg}flg' /path/to/input >output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Aug 12, 2004 #3 PHV MIS Nov 8, 2002 53,708 FR If you don't want the STARTUP line, you may try this: sed '1,/STARTUP/d' /path/to/input >output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
If you don't want the STARTUP line, you may try this: sed '1,/STARTUP/d' /path/to/input >output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Aug 12, 2004 Thread starter #4 dmjoen Technical User Jul 26, 2001 31 US Thanks PHV that works great! Upvote 0 Downvote