GNU bug report logs -
#12052
grep carriage return conflicts with output color highlighting
Previous Next
Reported by: Judson Wilson <wilson.judson <at> gmail.com>
Date: Thu, 26 Jul 2012 01:17:03 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12052 in the body.
You can then email your comments to 12052 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#12052
; Package
coreutils
.
(Thu, 26 Jul 2012 01:17:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Judson Wilson <wilson.judson <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 26 Jul 2012 01:17:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I had trouble grepping carriage returns (grep $'\r' ) until I realized the
lines were printing blank.
If I grep something else on the line, the line prints fine. Putting 1 and 1
together I figured it was
the result highlighting conflicting with the carriage return color, and I
was able to get it to
work using --color=never.
test case:
[judson <at> localhost ~]$ echo $'a\nb\r\n\c\n' > carriage.txt
[judson <at> localhost ~]$ grep 'b' carriage.txt
b
[judson <at> localhost ~]$ grep $'\r' carriage.txt
[judson <at> localhost ~]$ grep --color=never $'\r' carriage.txt
b
As for my versions:
[judson <at> localhost ~]$ grep -V
grep (GNU grep) 2.9
Copyright (C) 2011 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>.
[judson <at> localhost ~]$ uname -r
2.6.43.8-1.fc15.i686
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#12052
; Package
coreutils
.
(Mon, 15 Oct 2018 17:34:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12052 <at> debbugs.gnu.org (full text, mbox):
tags 12052 notabug
close 12052
stop
(triaging old bugs)
On 25/07/12 05:34 PM, Judson Wilson wrote:
> I had trouble grepping carriage returns (grep $'\r' ) until I realized the
> lines were printing blank.
>
This is a 'grep' bug, but you wrote to "bugs-coreutils <at> gnu.org".
If you still encounter this bug, please write to "bug-grep <at> gnu.org".
As such, I'm closing this bug.
regards,
- assaf
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 15 Oct 2018 17:34:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
12052 <at> debbugs.gnu.org and Judson Wilson <wilson.judson <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 15 Oct 2018 17:34:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 Nov 2018 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 222 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.