GNU bug report logs - #39368
Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)

Previous Next

Package: grep;

Reported by: Andrea Ranieri <andrea.ranieri <at> cnr.it>

Date: Fri, 31 Jan 2020 12:47:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#39368: closed (Possible visualization bug in GNU grep 3.1
 (Ubuntu 18.04 x86_64))
Date: Fri, 31 Jan 2020 20:21:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 31 Jan 2020 12:20:44 -0800
with message-id <08dc5bb4-6198-b681-7a48-eb862897ffff <at> cs.ucla.edu>
and subject line Re: bug#39368: Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)
has caused the debbugs.gnu.org bug report #39368,
regarding Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
39368: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39368
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andrea Ranieri <andrea.ranieri <at> cnr.it>
To: bug-grep <at> gnu.org
Subject: Possible visualization bug in GNU grep 3.1 (Ubuntu 18.04 x86_64)
Date: Fri, 31 Jan 2020 11:38:15 +0100
[Message part 3 (text/plain, inline)]
Dear grep maintainers,

I think I've found a file that makes grep display wrong things, namely
endlines when grep is run "alone", piping just two greps together vs. text
when the output is piped e.g. to more or hd (hexdump).

You can find this file attached, but the file is public and can be found in
this zipfile:
https://www-intuidoc.irisa.fr/files/2017/07/ComplementaryInfo_LMDHG.zip
(part of the Leap Motion Dynamic Hand Gesture (LMDHG) database:
https://www-intuidoc.irisa.fr/en/english-leap-motion-dynamic-hand-gesture-lmdhg-database/
).

The offending command is this one:

#> grep -v "Position\|hand type\|^\t\t$" ArticulationsOrder.txt | grep
'[^A-Z]' # outputs just endlines

While:

#> grep -v "Position\|hand type\|^\t\t$" ArticulationsOrder.txt | grep
'[^A-Z]' | more # outputs this lines
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"

METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"
METACARPAL   ="(63.1641, 111.558, 103.153)"
PROXIMAL     ="(63.1641, 111.558, 103.153)"
        INTERMEDIATE ="(32.0933, 130.062, 69.1525)"
DISTAL"      ="(21.6896, 137.526, 37.7594)"

I can reproduce this also on my Raspberry Pi 4 (with Ubuntu 18.04 and grep
v3.1 as well) and another x86_64 node with Xeon Silver belonging to a
research cluster (grep v2.20).

If you have any questions, do not hesitate to contact me. Thanks for all
the work you do.

Best regards
Andrea Ranieri

#> grep --version
grep (GNU grep) 3.1
Copyright (C) 2017 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.

Written by Mike Haertel and others, see <
http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.

#> uname -a
Linux zapp-brannigan 5.3.0-24-generic #26~18.04.2-Ubuntu SMP Tue Nov 26
12:34:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

#> alias | grep grep
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'


-- 
Andrea Ranieri, Ph.D.

Researcher
*National Research Council of Italy*
Via De Marini 6, 16149 Genova, Italy
Email: andrea.ranieri <at> cnr.it
[Message part 4 (text/html, inline)]
[ArticulationsOrder.txt (text/plain, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Paul Jackson <pj <at> usa.net>
Cc: 39368-done <at> debbugs.gnu.org, Andrea Ranieri <andrea.ranieri <at> cnr.it>
Subject: Re: bug#39368: Possible visualization bug in GNU grep 3.1 (Ubuntu
 18.04 x86_64)
Date: Fri, 31 Jan 2020 12:20:44 -0800
On 1/31/20 5:54 AM, Paul Jackson wrote:
> I'm guessing you'll see just a blank line and the "xyz".

Yes, this appears to be an issue where the user's terminal emulator 
clears the line after \r\n is output. So the user will see similar 
output using (say) 'cat', and the problem has nothing to do with 'grep' 
per se. Closing the bug report here, though it's quite possible a bug 
report should be filed against the user's terminal emulator (whatever it 
is).


This bug report was last modified 5 years and 109 days ago.

Previous Next


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