Your Question: How Do You Remove the First Two Lines in Unix?
Contents How Do I Remove the First Line in Unix? Using the Sed Command Removing the First Line from an Input File Using the Sed Command Is Pretty...
Contents
How do I remove the first line in Unix?
Using the sed Command
Removing the first line from an input file using the sed command is pretty straightforward. The sed command in the example above isn’t hard to understand. The parameter ‘1d’ tells the sed command to apply the ‘d’ (delete) action on line number ‘1’.
Must Read
How do I remove a few lines in Unix?
To Remove the lines from the source file itself, use the -i option with sed command. If you dont wish to delete the lines from the original source file you can redirect the output of the sed command to another file.