emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#10976: closed (bugreport tail (GNU coreutils) 5.97


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10976: closed (bugreport tail (GNU coreutils) 5.97)
Date: Fri, 09 Mar 2012 17:58:02 +0000

Your message dated Fri, 09 Mar 2012 10:56:22 -0700
with message-id <address@hidden>
and subject line Re: bug#10976: bugreport tail (GNU coreutils) 5.97
has caused the debbugs.gnu.org bug report #10976,
regarding bugreport tail (GNU coreutils) 5.97
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10976: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10976
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bugreport tail (GNU coreutils) 5.97 Date: Fri, 9 Mar 2012 08:47:08 +0100

Hi,

 

i just tried the following command with more than one file:

 

tail -50 files_*.txt

i get an error:

tail: invalid option -- 5

Try `tail --help' for more information.

 

If i try the same command with only one file it works properly:

tail -50 files.txt

 

If i try the modified command with more than one file it works properly:

tail --lines=50 files_*.txt

 

 

regards

 

Andreas

 

 

 

------------------------------------------------------------

mailto:address@hidden

tel.: +49 8669 31 2789

fax: +49 8669 32 2789

------------------------------------------------------------

 

DR. JOHANNES HEIDENHAIN GmbH

Dr.-Johannes-Heidenhain-Str. 5

83301 Traunreut, Deutschland

http://www.heidenhain.de/

 

 

------------------------------------------------------------------------------------------------------
Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: Traunreut
Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard
Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman),
Michael Grimm, Matthias Fauser, Sebastian Tondorf

E-Mail Haftungsausschluss / E-Mail Disclaimer

--- End Message ---

--- Begin Message --- Subject: Re: bug#10976: bugreport tail (GNU coreutils) 5.97 Date: Fri, 09 Mar 2012 10:56:22 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
tag 10976 notabug
thanks

On 03/09/2012 12:47 AM, Streit Andreas wrote:
> Hi,
> 
> i just tried the following command with more than one file:
> 
> tail -50 files_*.txt
> i get an error:
> tail: invalid option -- 5
> Try `tail --help' for more information.

Thanks for the report.  However, this behavior is intentional.  POSIX
says that you should be using -n50, and that while implementations may
support -50 as an extension, it is not a requirement.  Your usage is
non-portable, and coreutils is alerting you to the fact.

Per 'info tail',

>>    For compatibility `tail' also supports an obsolete usage `tail
>> -[COUNT][bcl][f] [FILE]', which is recognized only if it does not
>> conflict with the usage described above.  This obsolete form uses
>> exactly one option and at most one file.  In the option, COUNT is an
>> optional decimal number optionally followed by a size letter (`b', `c',
>> `l') to mean count by 512-byte blocks, bytes, or lines, optionally
>> followed by `f' which has the same meaning as `-f'.
>> 
>>    On older systems, the leading `-' can be replaced by `+' in the
>> obsolete option syntax with the same meaning as in counts, and obsolete
>> usage overrides normal usage when the two conflict.  This obsolete
>> behavior can be enabled or disabled with the `_POSIX2_VERSION'
>> environment variable (*note Standards conformance::).

> If i try the same command with only one file it works properly:
> tail -50 files.txt

Yes, this is an example of the obsolete usage.

> 
> If i try the modified command with more than one file it works properly:
> tail --lines=50 files_*.txt

Yes, this is the preferred style (simplified to -n).

Since the behavior is intentional, I'm closing this as not a bug.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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