Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: very weird echo problem



Peter Stephenson wrote:

> Hmm, you can't be telling us everything since TEST1 and TEST2
> are passed as positional parameters, which don't get used by
> log_function.  How does $MESSAGE get set?  Can you produce an
> actual minimal script which shows this?

Oops, sorry, I got a bit too schematic ;-)

It must read:

   log_function()
   {
      DATE=$(date)
      echo $1
      echo $1 >> $LOGFILE
   }

   log_function TEST1; log_function TEST2
   log_function TEST3; log_function TEST4

In the actual script, $DATE is included in the second echo (to the  
logfile), but the effects I describe are reproducable also the way  
that I have notated log_function here.


                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