bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: head that accepts gz files?


From: Bob Proulx
Subject: Re: head that accepts gz files?
Date: Wed, 2 Dec 2009 10:05:28 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]