[MPlayer-dev-eng] [PATCH] configure, detecting head and tail

Arwed von Merkatz v.merkatz at gmx.net
Sun May 2 11:47:47 CEST 2004


On Sun, May 02, 2004 at 02:18:47AM -0400, D Richard Felker III wrote:
> On Sun, May 02, 2004 at 02:05:43AM +0200, Diego Biurrun wrote:
> > Magnus Damm writes:
> > > This patch detects if "head -n x" or "head -x" should be used.
> > > The same goes for tail.
> > 
> > IMO checking for one of them should be enough.  I doubt you will find
> > a system where behavior differs between head and tail.  You could also
> > add a comment that explains why this is necessary at all.  And please
> > remove the trailing whitespace from your patch.
> 
> Broken GNU head/tail give errors when you use -1 in the latest
> version, reportedly. I haven't seen this myself. And it's well known
> that old unices' heads/tails do not support -n.
 
Just a note, setting the environment variable _POSIX2_VERSION=199209
makes coreutils head/tail work fine with -1.
arwed at Otherland:~$ echo test | head -1
head: `-1' option is obsolete; use `-n 1'
Try `head --help' for more information.
arwed at Otherland:~$ export _POSIX2_VERSION=199209
arwed at Otherland:~$ echo test | head -1
test


-- 
Arwed v. Merkatz                              Source Mage GNU/Linux developer
                                                    http://www.sourcemage.org




More information about the MPlayer-dev-eng mailing list