|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#37716: closed (grep exit status with -L redirected to /dev/null) |
Date: | Sun, 13 Oct 2019 01:34:02 +0000 |
Your message dated Sat, 12 Oct 2019 18:33:23 -0700 with message-id <address@hidden> and subject line Re: bug#37716: grep exit status with -L redirected to /dev/null has caused the debbugs.gnu.org bug report #37716, regarding grep exit status with -L redirected to /dev/null to be marked as done. (If you believe you have received this mail in error, please contact address@hidden.) -- 37716: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37716 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: grep exit status with -L redirected to /dev/null Date: Sat, 12 Oct 2019 15:22:05 +0100 User-agent: Mutt/1.12.2 (2019-09-21) Hi grep maintainers, This behaviour, with grep 3.3 built from source, is a bit surprising: $ echo hello >thing $ grep -L goodbye thing && echo OK thing OK $ grep -L goodbye thing >/dev/null && echo OK $ That is, when using -L, redirecting stdout to /dev/null has the same effect on the exit code as specifying -q (the behaviour with -q is described in the "Exit Status" section of the manual). This is a bit awkward if you're using grep in a script, because you don't necessarily have any control over whether stdout is /dev/null or not. Cheers, -- Adam Sampson <address@hidden> <http://offog.org/>
--- End Message ---
--- Begin Message ---Subject: Re: bug#37716: grep exit status with -L redirected to /dev/null Date: Sat, 12 Oct 2019 18:33:23 -0700 Thanks for reporting that bug. To fix it, I installed the attached patch into grep master on Savannah. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 0001-grep-fix-grep-L-.-dev-null-bug.patch
Description: Text Data
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |