Site icon Bytefreaks.net

Bash: tail: Remove first N lines from file

Advertisements

tail -n +$N inputFile > outputFile

Where $N is the number of the line which you want to start printing from.
For example if you want to delete only the first line / start printing from the second line you must issue the following:

tail -n +2 inputFile > outputFile

This post is also available in: Greek

Exit mobile version