[Bug 1394136] Re: if statement with pipe to grep randomly fails if pipefail is set

2017-06-19 Thread xhienne
This is not a bug, although some might disagree with the current behavior of bash. With a command like 'yes | grep -q .', because the grep terminates early and the yes is writing past the end of the pipe buffer, the yes process is _always_ terminated with a SIGPIPE signal (which translates to a re

[Bug 1394136] Re: if statement with pipe to grep randomly fails if pipefail is set

2014-11-19 Thread Nicholas Randon
** Changed in: bash (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1394136 Title: if statement with pipe to grep randomly fails if pipefail is set To manage

[Bug 1394136] Re: if statement with pipe to grep randomly fails if pipefail is set

2014-11-19 Thread Michael Kerrin
We can also see the following result: errin@kerrin-HP-Z620-Workstation:~/ce_build$ lsmod | grep -q -e ^kvm_amd -e ^kvm_intel; echo $? 141 kerrin@kerrin-HP-Z620-Workstation:~/ce_build$ lsmod | grep -q -e ^kvm_amd -e ^kvm_intel; echo $? 141 kerrin@kerrin-HP-Z620-Workstation:~/ce_build$ lsmod | gre

[Bug 1394136] Re: if statement with pipe to grep randomly fails if pipefail is set

2014-11-19 Thread Michael Kerrin
But this seems to work kerrin@kerrin-HP-Z620-Workstation:~/ce_build$ echo "kvm_intel xxx" | grep -q -e ^kvm_amd -e ^kvm_intel; echo $? 0 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1394136 Title: