From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29619 invoked from network); 16 Sep 2002 06:33:11 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 16 Sep 2002 06:33:11 -0000 Received: (qmail 7264 invoked by alias); 16 Sep 2002 06:32:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5349 Received: (qmail 7251 invoked from network); 16 Sep 2002 06:32:57 -0000 Date: Mon, 16 Sep 2002 08:32:55 +0200 From: Micha Holzmann To: zsh-users@sunsite.dk Subject: cat file|while read behaves not as expected Message-ID: <20020916063254.GA8555@idm-06.pf.kramski.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline User-Agent: Mutt/1.4i X-PGP-KeyID: 0x0EBA820F X-Request-PGP: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x0EBA820F X-Operating-System: GNU/Linux 2.4.18-4 X-Phone: +49 7231 970710 X-Fax: +49 7231 970711 X-SMS: +49 170 6180181 X-AntiVirus: OK! AntiVir MailGate Version 2.0.0.9; AVE: 6.15.0.0; VDF: 6.15.0.5 at mail-idm.mhnet.de has not found any known virus in this email. --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, i am new with zsh. I recently switched from bash to zsh. Now i stuck in a little problem. I use a file as configuration for a script. I read this file via cat and pipe the result to while read... The file content (example) is: >--- cut here ---- 1 2 3 4 5 >--- cut here ---- My script (a fragment from): >--- cut here ---- #!/bin/zsh cat ./tst.dat|while read line do for i in $line do echo $i done done >--- cut here ---- If i run this script, it prints "1 2 3 4 5" as result, if i change the shell to /bin/sh, it prints (te expected) result: 1 2 3 4 5 What is the fault i make? Thanks in advance for any respones, kind regards, Micha Holzmann --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9hXsWZrmPvQ66gg8RArJDAJ402uPyoh4ts/cMbVDnQs3QTNjFFwCfW8Hz p3nl5mmKcFnYRwXekTkj/tQ= =5F1C -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--