bug-coreutils
[Top][All Lists]
Advanced

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

bug#60215: tail -c +XX on newer coreutils wants FILE


From: Pádraig Brady
Subject: bug#60215: tail -c +XX on newer coreutils wants FILE
Date: Tue, 20 Dec 2022 13:04:57 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0

tag 60215 notabug
close 60215
stop

On 20/12/2022 09:30, Arkadiusz Miśkiewicz via GNU coreutils Bug Reports wrote:

# echo tessdfdsdsfdsfdsfdsfsdft | tail -c +13
sfdsfdsfsdft
# tail --version
tail (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.


while on newer version:

$ echo tessdfdsdsfdsfdsfdsfsdft | tail -c +13
tail: cannot open '+13' for reading: No such file or directory
$ tail --version
tail (GNU coreutils) 9.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.


Looking at NEWS but don't see any behaviour change info, so I guess it's
a bug.

I suspect you have _POSIX2_VERSION set somehow,
either in the environment or at build time.

The following should be instructive:

$ echo tessdfdsdsfdsfdsfdsfsdft | _POSIX2_VERSION=199209 tail -c +13
tail: cannot open '+13' for reading: No such file or directory

$ echo tessdfdsdsfdsfdsfdsfsdft | _POSIX2_VERSION=200112 tail -c +13
sfdsfdsfsdft

$ echo tessdfdsdsfdsfdsfdsfsdft | _POSIX2_VERSION=199209 tail -c+13
sfdsfdsfsdft

There are some details about this at:
https://www.gnu.org/software/coreutils/manual/html_node/Standards-conformance.html

thanks,
Pádraig





reply via email to

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