I have a large gzipped mysqldump file which contains some table definitions and then many insert statements. I'd like to edit the table definitions but leave the insert statements alone. The file is about 500gb when it's compressed so I'd like to avoid ungzipping it just to edit it. To skip the header I could do
zcat bigfile.gz | tail -n+50
And to just add the header to another gzipped file I can do
zcat header.gz bigfile.gz
But is there any way to combine these two statements?