Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove First Line in File 2

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

From a Bourne shell script how can I remove the first line in a file?

The file is simply a verticle list created by a program but the first line unfortunately is a blank space.

Thanks,

Michael42
 
sed version:

Code:
#!/bin/sh
 
sed '1d' file.with_first_blank_line > test.without_first_blank_line

HTH

mrjazz
 
Thanks all - very simple yet effective methods. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top