From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9426 invoked from network); 12 May 2005 06:28:38 -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 06:28:38 -0000 Received: (qmail 10140 invoked from network); 12 May 2005 06:28:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 May 2005 06:28:31 -0000 Received: (qmail 16211 invoked by alias); 12 May 2005 06:28:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8809 Received: (qmail 16201 invoked from network); 12 May 2005 06:28:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 May 2005 06:28:24 -0000 Received: (qmail 9073 invoked from network); 12 May 2005 06:28:23 -0000 Received: from vhost.2-0.pl (HELO mail.2-0.pl) (81.219.246.2) by a.mx.sunsite.dk with SMTP; 12 May 2005 06:28:20 -0000 Received: from 2-0.pl (vhost.2-0.pl [81.219.246.2]) by mail.2-0.pl (8.13.0/8.13.0) with ESMTP id j4C6SHlF003017 for ; Thu, 12 May 2005 08:28:18 +0200 From: "krasnal" To: zsh-users@sunsite.dk Subject: Little problem while converting from bash (quoting/splitting?) Date: Thu, 12 May 2005 09:28:17 +0300 Message-Id: <20050512060921.M13778@2-0.pl> X-Mailer: Open WebMail 2.40 20040909 X-OriginatingIP: 62.180.53.223 (krasnal) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 X-Scanned-By: MIMEDefang 2.41 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=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Hello, I'm right now moving to zsh from bash which supposed to be straightforward but I've encountered one problem. Here's the log: krasnal@szuflandia ~ $ for f in $(cleartool lsvob -short | head -10); do case $f in *gli* ) echo $f | xxd;; esac; done 0000000: 5c67 6c69 320d 0a \gli2.. krasnal@szuflandia ~ $ bash krasnal@szuflandia ~ $ for f in $(cleartool lsvob -short | head -10); do case $f in *gli* ) echo $f | xxd;; esac; done 0000000: 5c67 6c69 320a \gli2. 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. This is a bit problematic for me because I'm eventually using these values for output and the \r chars screw it up. I've already learned that by default echo interprets \a,\b,... sequences which I also have so I have to either use -E or set bsd_echo option but this one is a bit puzzle for me. Is there an option for this (I thought sh_word_split would be the right one but there's no change). How should I solve this? I mean I know I can try to strip \r which would work for both windows and unix version but isn't there a simpler/more elegant way? Best regards -- ____ _ ___ / | \_/ |/ _ \ Andrzej Marek Ostruszka / _ | | (_) | MPSC (Cracow) /_/ L|_|V|_|\___/ (GnuPG key ID: 0x3D9C498A)