Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: very weird echo problem
- X-seq: zsh-users 742
- From: Uli Zappe <uli@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: very weird echo problem
- Date: Mon, 3 Mar 97 17:54:50 +0100
- Cc: gwing@xxxxxxxxxxxxxxx
- In-reply-to: <19970303144653.2708.qmail@xxxxxxxxxxxxxxx>
- References: <19970303144653.2708.qmail@xxxxxxxxxxxxxxx>
Geoff Wing wrote:
> Can you produce more of the script? There isn't enough there to
> determine what the problem is. I produced no problems from a
> cron job or via other non-tty specific methods either with 2.5.03
> or 3.* Thanks
You got me wrong. This actually IS practically the complete test
script (well, #!/usr/bin/zsh is missing, and you should replace
$LOGFILE by a name...) which reproduces the problem on my machine.
Here is the actual one with which I just tested it again:
***********************************************************
#!/usr/bin/zsh
log()
{
DATE=$(date)
echo $1
echo $1 >>/log
}
log TEST; log TEST_SAME_LINE
log TEST_NEXT_LINE
************************************************************
This script will only write
TEST
TEST_SAME_LINE
to /log when called by cron. It works fine when called from a shell.
It also works fine if I apply one of the following changes to log():
1.******************************
DATE=$(date)
echo $1 1>&1
echo $1 >>/log
2.******************************
date
echo $1
echo $1 >>/log
3.******************************
DATE=$(date)
echo $1 >>/log
I'm using zsh 2.5.02 under NEXTSTEP 3.3 Intel. (2.5.02 is the
distribution that is included in NEXTSTEP 3.3).
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