How Do You Remove the First Line 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 you remove a line in Unix?
Deleting a Line
- Press the Esc key to go to normal mode.
- Place the cursor on the line you want to delete.
- Type dd and hit Enter to remove the line.