This is the mail archive of the
cygwin
mailing list for the Cygwin project.
"Broken pipe" warning from bash.
- From: Bas van Gompel <cygwin dot buzz at bavag dot tmfweb dot nl>
- To: cygwin at cygwin dot com
- Date: Tue, 28 Sep 2004 09:53:32 +0200 (MET DST)
- Subject: "Broken pipe" warning from bash.
- Organisation: Ehm...
- Reply-to: cygwin mailing-list <cygwin at cygwin dot com>
Hi,
Following little (bash) shell-script many times causes a "Broken pipe"
(SIGPIPE) warning to be emitted by bash. Is this expected behaviour?
An example of the message:
./tc-pipe.sh: line 5: 3541109 Broken pipe seq 1 2
The message is generated on the second pass through the loop.
Changing ``a b'' to ``a b c d e'' below, often prints the message 4
times.
=== Begin tc-pipe.sh ===
#!/bin/bash
for t in a b; do
seq 1 2
done | head -n 1
==== End tc-pipe.sh ====
L8r,
Buzz.
--
) | | ---/ ---/ Yes, this | This message consists of true | I do not
-- | | / / really is | and false bits entirely. | mail for
) | | / / a 72 by 4 +-------------------------------+ any1 but
-- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^re
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/