GNU bug report logs - #60215
tail -c +XX on newer coreutils wants FILE

Previous Next

Package: coreutils;

Reported by: Arkadiusz Miśkiewicz <arekm <at> maven.pl>

Date: Tue, 20 Dec 2022 09:31:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chris Elvidge <celvidge001 <at> gmail.com>
To: Arkadiusz Miśkiewicz <arekm <at> maven.pl>, 60215 <at> debbugs.gnu.org
Subject: bug#60215: tail -c +XX on newer coreutils wants FILE
Date: Tue, 20 Dec 2022 12:07:10 +0000

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.
> 

Works OK here. -c [+]13 includes the trailing newline (see hexdump below)

$ bash --version
GNU bash, version 5.2.15(1)-release (x86_64-slackware-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://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.

$ 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.

[0] slack15-a!chris:(pts/1):Tue 20 Dec 2022 11:44 am GMT:/home/chris
$ echo tessdfdsdsfdsfdsfdsfsdft | tail -c +13
sfdsfdsfsdft

[0] slack15-a!chris:(pts/1):Tue 20 Dec 2022 11:45 am GMT:/home/chris
$ echo tessdfdsdsfdsfdsfdsfsdft | tail -c 13
sfdsfdsfsdft

[0] slack15-a!chris:(pts/1):Tue 20 Dec 2022 11:48 am GMT:/home/chris
$ tail -c +13 <<<'tessdfdsdsfdsfdsfdsfsdft'
sfdsfdsfsdft

[0] slack15-a!chris:(pts/1):Tue 20 Dec 2022 11:50 am GMT:/home/chris
$ tail -c13 <<<'tessdfdsdsfdsfdsfdsfsdft'
sfdsfdsfsdft

[0] slack15-a!chris:(pts/1):Tue 20 Dec 2022 11:55 am GMT:/home/chris
$ tail -c13 <<<'tessdfdsdsfdsfdsfdsfsdft' | hexdump -c
0000000   s   f   d   s   f   d   s   f   s   d   f   t  \n
000000d


-- 

Chris Elvidge






This bug report was last modified 2 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.