bugGNU Core Utilities - Bugs: bug #21549, "tail +N file" fails

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #21549: "tail +N file" fails

Submitted by:  Iaroslav Gaponenko <adrahil>
Submitted on:  Fri 09 Nov 2007 03:32:29 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sat 10 Nov 2007 08:57:59 PM UTC, comment #1:

Closing this report, since it is not a bug, but a misunderstanding on your part on the POSIX rules for tail. See the NEWS file, where the entry for coreutils 5.90 states:

A few usages still have behavior that depends on which POSIX standard is
being conformed to, and portable applications should beware these
problematic usages. These include:

Problematic Standard-conforming replacement, depending on
usage whether you prefer the behavior of:
POSIX 1003.2-1992 POSIX 1003.1-2001
sort +4 sort -k 5 sort ./+4
tail +4 tail -n +4 tail ./+4

Also, consult 'info coreutils standard', which states:

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 have a newer system but are running
software that assumes an older version of POSIX and uses `sort +1' or
`tail +10', you can work around any compatibility problems by setting
`_POSIX2_VERSION=199209' in your environment.

Eric Blake <ericb>
Project Administrator
Fri 09 Nov 2007 03:32:29 PM UTC, original submission:

For instance, this is what I get when I run the command:

$ tail.bak +10 .bashrc
tail.bak: cannot open `+10' for reading: No such file or directory
==> .bashrc <==
PS1='\u@\h \w \$ '
fi
fi

# Try to keep environment pollution down, EPA loves us.
unset use_color safe_term match_lhs

export TERM=rxvt

[[ -f /etc/profile.d/bash-completion ]] &&
source /etc/profile.d/bash-completion

This was tried using version 6.9-r1 stable in gentoo 2007.0 .

Iaroslav Gaponenko <adrahil>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by adrahil (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Nov 2007 08:57:59 PM UTCericbStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1