bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74699: need valid explanation / weird 'grep -q' behaviour


From: Paul Eggert
Subject: bug#74699: need valid explanation / weird 'grep -q' behaviour
Date: Thu, 5 Dec 2024 11:59:20 -0800
User-agent: Mozilla Thunderbird

On 2024-12-04 15:43, Frank Reppin wrote:
Some claim that this is due to 'set -o pipefail' beeing used in the script... but this does not really explain why it only _sometimes_ happens.

I don't see why not. Pipe buffering is an "it all depends" situation.

Anyway, I tried your script on bleeding-edge grep on Fedora 40 and it worked fine for me. You didn't mention your grep version; behavior in this area changed in 2016, though I doubt your version is that old.

One workaround is to use "set -o pipefail" only for pipelines where you want the entire pipeline to fail merely because one component failed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]