Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Unidentified subject!
- X-seq: zsh-users 685
- From: Uli Zappe <uli@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Unidentified subject!
- Date: Mon, 17 Feb 97 08:48:17 +0100
- In-reply-to: <199702170617.BAA11100@xxxxxxxxxxxxxxxxxxxxxxxx>
- References: <9702170618.AA16311@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <199702170617.BAA11100@xxxxxxxxxxxxxxxxxxxxxxxx>
Hi,
first of all, I wrote:
>since I have a few questions concerning zsh somebody sent me the
>address of this mailing list but I don't know how to
>subscribe/unsubscribe (mechanisms differ widely...). Could a kind
>soul please give me this info?
This mail has apparently already triggered the subscription
mechanism by mentioning "subscribe" in the subject line, so no help
is necessary anymore :-)
Now my problem which I find quite confusing:
I am porting a large and complex sh-script to zsh because I need
the ability of zsh to deal with German Umlauts. While after some
effort most everything works, I have encountered the following
strange problem:
I have to create a list of file names to use it with 'cat' in a
for-do loop:
for VARIABLE in $VARIABLE_LIST
do
< generate the according filename FILE >
FILENAME_LIST="$FILENAME_LIST$FILE "
done
Now, if I do a 'echo $FILENAME_LIST' I get the wanted result
FILE1 FILE2 FILE3...
However, if I then process
cat $FILENAME_LIST
I get
FILE1
FILE2
FILE3: No such file or directory
i.e obviously 'cat' treats all the files as a single filename; and
this because the filenames for some strange reason are NO MORE
separated by spaces but by newlines.
After endles tinkering I found out I can remedy this situation by doing a
FILENAME_LIST=($(echo $FILENAME_LIST))
before applying FILENAME_LIST to cat; but that seems like a weird
pseudo-tautological patch to me.
What confuses me most is the following:
If (just for test purposes) I define
FILENAME_LIST=(FILE1 FILE2 FILE3)
instead of defining it by the for-do loop, everything works WITHOUT
the need for the above mentioned patch. HOWEVER, if I do an 'echo
$FILENAME_LIST' for debugging purposes in both cases, I get exactly
the SAME OUTPUT IN BOTH CASES. I.e. though this 'echo
$FILENAME_LIST' command displays
FILE1 FILE2 FILE3
in both cases without ANY difference, in one case 'cat
$FILENAME_LIST' won't work and in the other case it will.
Can somebody please explain me what's going on?
And can you tell me if I REALLY have to use this strange patch from
above, or if there's a "regular" solution to my problem?
Thank you VERY much for any insight!
Bye
Uli
______________________________________________________________________
Uli Zappe E-Mail: uli@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
(NeXTMail,Mime,ASCII) PGP on request
Lorscher Strasse 5 WWW: -
D-60489 Frankfurt Fon: +49 (69) 9784 0007
Germany Fax: +49 (69) 9784 0042
staff member of NEXTTOYOU - the German NEXTSTEP/OPENSTEP magazine
______________________________________________________________________
Messages sorted by:
Reverse Date,
Date,
Thread,
Author