delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/28/03:53:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <n2m-g.cjbbtl.3vveifr.1@buzzy-box.bavag>
From: Bas van Gompel <cygwin DOT buzz AT bavag DOT tmfweb DOT nl>
Subject: "Broken pipe" warning from bash.
Reply-To: cygwin mailing-list <cygwin AT cygwin DOT com>
Organisation: Ehm...
User-Agent: slrn/0.9.8.0 (Win32) Hamster/2.0.5.5
To: cygwin AT cygwin DOT com
Lines: 28
Date: Tue, 28 Sep 2004 09:53:32 +0200 (MET DST)
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019