zcat skip streaming first line while reading from a compressed file

1k Views Asked by At

I am using the zcat command and streaming a .tar.gz file through a piping operation. I want to skip the first line while zcat reads the file. How is it possible?

1

There are 1 best solutions below

2
Leonardo Dagnino On BEST ANSWER

You can pipe the output to tail, passing -n +2 to start at the second line:

zcat file | tail -n +2