Question

i need to redirect all of the stdout of a program except the first line into a file.

Is there a common unix program that removes lines from stdin and spits the rest out to stdout?

Was it helpful?

Solution

Others have already mentioned "tail". sed will also work:

sed 1d

As will Awk:

awk 'NR > 1'

OTHER TIPS

tail -n +2 -f -

sed -e 1d < input > output

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top