From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23887 invoked from network); 12 May 2005 16:29:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 May 2005 16:29:32 -0000 Received: (qmail 19578 invoked from network); 12 May 2005 16:29:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 May 2005 16:29:26 -0000 Received: (qmail 3432 invoked by alias); 12 May 2005 16:29:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8822 Received: (qmail 3415 invoked from network); 12 May 2005 16:29:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 May 2005 16:29:19 -0000 Received: (qmail 18504 invoked from network); 12 May 2005 16:29:19 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 12 May 2005 16:29:15 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IGD0049OXSPS1H2@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Thu, 12 May 2005 11:29:14 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j4CGTCQA017237; Thu, 12 May 2005 09:29:12 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j4CGTBW6017236; Thu, 12 May 2005 09:29:11 -0700 Date: Thu, 12 May 2005 16:29:11 +0000 From: Bart Schaefer Subject: Re: Little problem while converting from bash (quoting/splitting?) In-reply-to: <20050512060921.M13778@2-0.pl> To: "krasnal" , zsh-users@sunsite.dk Message-id: <1050512162911.ZM17235@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050512060921.M13778@2-0.pl> Comments: In reply to "krasnal" "Little problem while converting from bash (quoting/splitting?)" (May 12, 9:28am) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On May 12, 9:28am, krasnal wrote: } } This is with 4.2.4 cygwin version of zsh and 2.05b.0(1)-release of bash. } cleartool is windows program producing \r\n line terminated output. Note } that zsh has both \r and \n in f variable while bash has only \n. Bash apparently reads stdin/stdout pipes in text mode, whereas zsh does so in binary mode. It's somewhat reasonable to assume pipes are text in a shell context, but because zsh has so many ways to manipulate parameters, I seem to recall a there was a conscious decision made to use text mode as little as possible; in effect, it's used only when reading from files. Which suggests a possible workaround; I don't have a cygwin zsh handy to try it: for f in $(<=(cleartool lsvob -short | head -10)); do ...