Public bug reported:
== Comment: #0 - Liang Chang Guo <[email protected]> - 2015-10-06 20:43:30 ==
For testing if a system is Ubuntu, the following combined command with bash
always gets extra BrokenPipeError on Ubuntu (14.04 to 15.10):
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq Ubuntu
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w'
encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
While the return code is correct:
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq Ubuntu &&
echo It-is-Ubuntu
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w'
encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
It-is-Ubuntu
It may work well if with slight changes for the command:
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -i Ubuntu
NAME="Ubuntu"
... ...
# ( cat /etc/os-release /proc/version; lsb_release -is ) | grep -iq UbuntuW
# ( cat /etc/os-release /proc/version; sleep 1; echo =; lsb_release -is ) |
grep -iq Ubuntu
# cat /etc/os-release /proc/version | grep -iq Ubuntu
# (lsb_release -is) | grep -iq Ubuntu
*** Ubuntu Platform Info ***
# uname -a
Linux ubt1510J2 4.2.0-12-generic #14-Ubuntu SMP Mon Sep 28 16:50:34 UTC 2015
ppc64le ppc64le ppc64le GNU/Linux
# dpkg -l bash grep
||/ Name Version Architecture
Description
+++-=================================-=====================-=====================-=========================
ii bash 4.3-14ubuntu1 ppc64el
GNU Bourne Again SHell
ii grep 2.21-2 ppc64el
GNU grep, egrep and fgrep
** Affects: ubuntu
Importance: Undecided
Assignee: Taco Screen team (taco-screen-team)
Status: New
** Tags: architecture-ppc64le bugnameltc-131447 severity-low
targetmilestone-inin1510
** Tags added: architecture-ppc64le bugnameltc-131447 severity-low
targetmilestone-inin1510
** Changed in: ubuntu
Assignee: (unassigned) => Taco Screen team (taco-screen-team)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1504127
Title:
grep -q gets broken pipe message with multiple expressions
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1504127/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs