Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: beta 19 cannot run this script
- X-seq: zsh-workers 1265
- From: Carlos Carvalho <carlos@xxxxxxxxxxxxxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: beta 19 cannot run this script
- Date: Wed, 5 Jun 96 14:31 EST
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960605090343.ZM5719@xxxxxxxxxxxxxxxxxxxxxxx>
- References: <m0uRK3H-00001zC@xxxxxxxxxxxxxxxxxxxxx> <carlos@xxxxxxxxxxxxxxxxxxxxx> <960605090343.ZM5719@xxxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote on 5 June 1996 09:03:
>On Jun 5, 11:59am, Carlos Carvalho wrote:
>} Subject: beta 19 cannot run this script
>}
>} I had to link /bin/sh to zsh in order to make automatic tex font
>} generation work. However, zsh (called as sh), doesn't run this script:
>
>This seems to be the problem:
>
>======
>bash:
>
>$ [ ! ] && echo OK
>OK
>======
>True Bourne shell:
>
>$ [ ! ] && echo OK
>[: argument expected
>======
>zsh:
>
>% [ ! ] && echo OK
>[: argument expected
>======
>
>So I think zsh is OK in this case.
Hmmm...
>Here's the culprit in the script:
>
> if [ ! $APS_BASEDIR ]; then
>
>This isn't a very portable script in the first place. A better test for
>a variable being unset would be:
>
>
> if [ -z "$APS_BASEDIR" ]; then
I tried this and it doesn't work :-(
Trying with this small version:
#! /bin/sh
if [ -z $APS_BASEDIR ]; then
APS_BASEDIR=`grep APS_BASEDIR /etc/printcap | cut -d ':' -f 2`
export APS_BASEDIR
fi
I get
./foo: [: argument expected [2]
So there seems to be something wrong...
Carlos
Messages sorted by:
Reverse Date,
Date,
Thread,
Author