Pádraig Brady wrote:
> Alfred M. Szmidt wrote:
> > You can use: zcat foo.gz | head
>
> Or more generally: gzip -fdc "$file" | head
> The issue with that is that one can't pass multiple files
> to `head` and get a ==> filename <== inserted.
The markers seem mostly intended for interactive use. For interactive
use I much prefer 'less'. (Or one can use 'more' or 'most'.) With a
'less' input processor specified in LESSOPEN it makes this very
convenient to open any of a number of different types of files.
$ less foo.gz
$ less foo1.gz foo2.gz foo3 foo4.bz2
There has been recent discussion about 'zutils' a project to host the
entire class of decompressors. If a 'zhead' were suggested then it
should go into the 'zutils' project. But there doesn't seem to be a
need for it.
Bob