GNU bug report logs - #74159
Unexpected exit code of 0 when -q is set and close_stdout fails

Previous Next

Package: grep;

Reported by: Jan Černohorský <jan <at> kam.mff.cuni.cz>

Date: Fri, 1 Nov 2024 13:22:04 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #13 received at 74159 <at> debbugs.gnu.org (full text, mbox):

From: Martin Schulte <gnu <at> schrader-schulte.de>
To: Jan Černohorský <jan <at> kam.mff.cuni.cz>
Cc: wizards <at> kam.mff.cuni.cz, 74159 <at> debbugs.gnu.org
Subject: Re: bug#74159: Unexpected exit code of 0 when -q is set and
 close_stdout fails
Date: Sat, 2 Nov 2024 10:28:12 +0100
Hello Jan!

On Fri, 1 Nov 2024 14:10:43 +0100 you wrote:
> https://grsc.cz/blog/loffice-linux-issues/, but it's mostly not relevant 
> for this bug).

While I can't help you with grep/operating system issue I suggest replacing

if echo "$checks" | grep -q "cc" ; then

by

if [ ${#checks} -gt 1 ] ; then

It simply tests if the string inside the variable checks is longer than 1, uses less system resources and all shell features you need have already been part of POSIX 1003.1 Issue 6 from 2004.

Best regards,

Martin




This bug report was last modified 202 days ago.

Previous Next


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