|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#17032: closed (side effect bug...) |
Date: | Tue, 18 Mar 2014 16:01:02 +0000 |
Your message dated Tue, 18 Mar 2014 08:59:39 -0700 with message-id <address@hidden> and subject line Re: bug#17032: side effect bug... has caused the debbugs.gnu.org bug report #17032, regarding side effect bug... to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 17032: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17032 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: side effect bug... Date: Tue, 18 Mar 2014 05:41:15 +0100 The option "-n" have a side effect with the option "-P" and the regexp '^\r$', the line numbers got overwritten by the carriage return char so these don't appear on output. User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 cmd ex: grep -Pn '^\r$' file.txt ps: I know I can see the numbers by redirecting output in a file.
--- End Message ---
--- Begin Message ---Subject: Re: bug#17032: side effect bug... Date: Tue, 18 Mar 2014 08:59:39 -0700 tags 17032 + notabug thanks On Mon, Mar 17, 2014 at 9:41 PM, Roméo Capulet <address@hidden> wrote: > The option "-n" have a side effect with the option "-P" and the regexp > '^\r$', the line numbers got overwritten by the carriage return char so > these don't appear on output. > > cmd ex: grep -Pn '^\r$' file.txt > > ps: I know I can see the numbers by redirecting output in a file. Thanks for the report. You can avoid that in at least two ways: either filter out all \r bytes or filter through something like cat -A that renders them another way: grep -Pn '^\r$' file.txt | tr -d '\r' or grep -Pn '^\r$' file.txt | cat -A
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |