From: Micha Holzmann <holzmann@mhnet.de>
To: zsh-users@sunsite.dk
Subject: cat file|while read behaves not as expected
Date: Mon, 16 Sep 2002 08:32:55 +0200 [thread overview]
Message-ID: <20020916063254.GA8555@idm-06.pf.kramski.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2002-09-16 6:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 6:32 Micha Holzmann [this message]
2002-09-16 6:52 ` Paul Lew
2002-09-16 7:45 ` Micha Holzmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020916063254.GA8555@idm-06.pf.kramski.de \
--to=holzmann@mhnet.de \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).