From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13428 invoked from network); 14 Feb 2001 20:30:04 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Feb 2001 20:30:04 -0000 Received: (qmail 7457 invoked by alias); 14 Feb 2001 20:29:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3616 Received: (qmail 7439 invoked from network); 14 Feb 2001 20:29:08 -0000 X-Authentication-Warning: exploding.fh-konstanz.de: goetzger owned process doing -bs Date: Wed, 14 Feb 2001 21:28:04 +0100 (MET) From: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= Sender: Reply-To: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= To: Subject: Problems with Parameter Expansion := Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi there again, my second problem is that I want to set NAME to WORD, if NAME is not set, example from zsh.info: ${NAME:=WORD} my script (called script.sh): -- begin -- if [ ${NAME:=`hostname | cut -c5-8`} ] then echo $NAME fi if [ ${NAME1:=""} = "true" ] then echo "true" fi -- end -- asuming, my hosts name is exploding: $ echo $NAME zsh: NAME: parameter not set $ echo $NAME1 zsh: NAME1: parameter not set $ . script.sh odin script.sh:6: parse error: condition expected: = Again, it runs with bash and ksh. Why does it not expand NAME1 to "" ? running it with set -x it shows: $ . script.sh +-zsh:8> . script.sh +script.sh:1> [ odin ] +script.sh:3> echo odin odin +script.sh:6> [ = true ] script.sh:6: parse error: condition expected: = Any ideas? Thanks for our help. Regards Heinrich