GNU bug report logs - #56843
grep mangling lines

Previous Next

Package: grep;

Reported by: "David G. Pickett" <dgpickett <at> aol.com>

Date: Sat, 30 Jul 2022 17:11: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: Paul Eggert <eggert <at> cs.ucla.edu>
To: "David G. Pickett" <dgpickett <at> aol.com>
Cc: 56843 <at> debbugs.gnu.org
Subject: bug#56843: grep mangling lines
Date: Sat, 30 Jul 2022 11:17:43 -0700
I'm not seeing the problem on Ubuntu 22.04 LTS, using grep 3.7 and GNOME 
Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD. The output 
isn't even colored unless I pass something like '--color=always' to 
'grep', which leads me to wonder whether you're using an alias for 
'grep' instead of the real thing.

Here's how I tried to reproduce the problem. What happens when you try 
the same thing on your platform? and what is your platform?

$ cat >x <<'EOF'
> 30 23 * * * /usr/bin/freshclam --datadir=/home/dgp/.clamtk/db 
--log=/home/dgp/.clamtk/db/freshclam.$(/bin/date +\%b-\%d-\%Y).log 
>/home/dgp/.clamtk/db/freshclam_cron.log 2>&1 ; 
/usr/local/bin/clamdscan --config-file=/etc/clamav/clamd.conf --reload 
--log="$HOME/.clamtk/history/$(/bin/date +\%b-\%d-\%Y).log" 
>>.clamtk/history/clamscan.log 2>&1 ; /usr/local/bin/clamdscan 
--config-file=/etc/clamav/clamd.conf --quiet --multiscan --fdpass 
--log="$HOME/.clamtk/history/$(/bin/date +\%b-\%d-\%Y).log" $HOME 
>>.clamtk/history/clamscan.log 2>&1 # freshclam update and clam-scan
> EOF
$ cat x | grep clam | diff x -
$ e=$(printf '\033')
$ cat x | grep --color=always clam | sed "s/$e\\[[0-9;]*.//g" | diff x -
$ which grep
/usr/bin/grep




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

Previous Next


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