I want to display the first few line of each of a batch of log files, some of which are gzipped.
Normally I'd use zcat in place of cat, zgrep in place of grep, etc, to work with a mixture of compressed and uncompressed files. But zhead and ztail don't exist.
What's the best way to achieve this: zhead -n1 /var/log/syslog* (show the first line of each syslog* file)?
All the thoughts I had got increasingly convoluted. Obviously stuff like: zcat /var/log/syslog* | head -n1 .. doesn't achieve what I want...