zsh-users
 help / color / mirror / code / Atom feed
From: Uli Zappe <uli@tallowcross.uni-frankfurt.de>
To: zsh-users@math.gatech.edu
Subject: Unidentified subject!
Date: Mon, 17 Feb 97 08:48:17 +0100	[thread overview]
Message-ID: <9702170748.AA17600@tallowcross.uni-frankfurt.de> (raw)
In-Reply-To: <199702170617.BAA11100@euclid.skiles.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
______________________________________________________________________


       reply	other threads:[~1997-02-17  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9702170618.AA16311@tallowcross.uni-frankfurt.de>
     [not found] ` <199702170617.BAA11100@euclid.skiles.gatech.edu>
1997-02-17  7:48   ` Uli Zappe [this message]
1997-02-17 18:04     ` Zefram
1998-10-22 21:59 Je suis une creature de la Nuit
  -- strict thread matches above, loose matches on Subject: below --
1998-02-01 14:50 Oliver Kiddle
1997-10-11  7:05 Quinn Dunkan
1995-11-22 21:48 compdsgn

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=9702170748.AA17600@tallowcross.uni-frankfurt.de \
    --to=uli@tallowcross.uni-frankfurt.de \
    --cc=zsh-users@math.gatech.edu \
    /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).