[plug] my Linux is too young! Need older "tail" and "head"

Cameron Patrick cameron at patrick.wattle.id.au
Wed Jun 30 22:56:18 WST 2004


Cameron Patrick wrote:

| Denis Brown wrote:
| 
| | I suppose the option I have is to get from somewhere a more forgiving
| | (elderly?) tail and head and put them in the path before the system tail
| | and head (or symlink to them, etc).   Seems a bit messy to me so I turn
| | here for further inspiration :-)
| 
| There's something you can do involving setting a POSIXLY_CORRECT
| environment variable (and various others) to make some GNU tools act
| like older ones.  I'm not sure where this is documented though.

Aha, from 'info coreutils':

       The GNU utilities normally conform to the version of POSIX that
    is standard for your system.  To cause them to conform to a
    different version of POSIX, define the `_POSIX2_VERSION'
    environment variable to a value of the form YYYYMM specifying the
    year and month the standard was adopted.  Two values are currently
    supported for `_POSIX2_VERSION': `199209' stands for POSIX
    1003.2-1992, and `200112' stands for POSIX 1003.1-2001.  For
    example, if you are running older software that assumes an older
    version of POSIX and uses `sort +1', `head -1', or `tail +1', you
    can work around the compatibility problems by setting
    `_POSIX2_VERSION=199209' in your environment.

HTH,

Cameron.




More information about the plug mailing list