From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14620 invoked from network); 17 Feb 1997 08:13:32 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 17 Feb 1997 08:13:32 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA12153; Mon, 17 Feb 1997 02:54:48 -0500 (EST) Resent-Date: Mon, 17 Feb 1997 02:46:45 -0500 (EST) Message-Id: <9702170748.AA17600@tallowcross.uni-frankfurt.de> Content-Type: text/plain Mime-Version: 1.0 (NeXT Mail 3.3 v118.2) In-Reply-To: <199702170617.BAA11100@euclid.skiles.gatech.edu> X-Nextstep-Mailer: Mail 3.3 (Enhance 1.3) From: Uli Zappe Date: Mon, 17 Feb 97 08:48:17 +0100 To: zsh-users@math.gatech.edu References: <9702170618.AA16311@tallowcross.uni-frankfurt.de> <199702170617.BAA11100@euclid.skiles.gatech.edu> Resent-Message-ID: <"Sgqlo3.0.Mw2.ap02p"@euclid> Resent-From: zsh-users@math.gatech.edu Subject: Unidentified subject! X-Mailing-List: archive/latest/685 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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@tallowcross.uni-frankfurt.de (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 ______________________________________________________________________