[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] Grep: Broken pipe error
From: |
Paul Eggert |
Subject: |
Re: [bug-grep] Grep: Broken pipe error |
Date: |
Thu, 03 Feb 2005 15:06:50 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
"McCully, Dwayne (NIH/NLM/LHC)" <address@hidden> writes:
> After compiling grep 2.5.1a on Solaris 2.9, I try to use the grep program
> but get the follwing error:
>>% /site/bin/egrep MSHSPA /umls/Releases/2005AA/META/MRCONSO.RRF | head -1
>
> egrep: writing output: Broken pipe
Most likely you are ignoring the PIPE signal instead of the default
behavior (which is to exit).
For example, on my Solaris 9 box running grep 2.5.1a under Bash:
$ grep . /etc/termcap | sed 1q
# (((( start of locally maintained termcap entries
$ trap '' PIPE
$ grep . /etc/termcap | sed 1q
grep: writing output: Broken pipe
grep: writing output: Broken pipe
grep: writing output: Broken pipe
...
The fix is to stop ignoring PIPE.