I usually use
tail -n +2
to get all the first line of a file but today I learned you can also accomplish the same task with
sed '1d'
Both also work for removing more than just the first line of an input. To remove the first three lines
sed '1,3d'
is equivalent to
tail -n +4
It seems like tail
is recommended for larger files though, since it doesn’t process the entire file.