Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] head -1 weirdo

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Arwed von Merkatz <v.merkatz AT gmx.net>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] head -1 weirdo
  • Date: Sat, 16 Oct 2004 11:58:10 +0200

On Fri, Oct 15, 2004 at 11:56:10PM +0200, neuron wrote:
> Hello,
>
> today while I was testing qmail spell I found that head neets to have
> defined _POSIX2_VERSION environment and that must be less than 200112
> (from the source head.h, coreutils), in order to 'head -1' work. In our
> spells it's not problem since we are using 'head -n 1', but for example
> in qmail makefile there's the old notation.
>
> So, if you ever get "head: `-1' option is obsolete; use `-n 1'" waring
> and you can not or want not to modify to '-n 1', just put "export
> _POSIX2_VERSION=0" before and everything should be ok.
>
> From the source, expand split date fold head touch join nice tail sort
> uniq unexpand od pr commands are all checing this variable for value
> 200112.

You shouldn't need to set it, the coreutils spell takes care of that
(/etc/profile.d/coreutils.sh).

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




Archive powered by MHonArc 2.6.24.

Top of Page