Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sourcing a sh file in zsh
- X-seq: zsh-users 13716
- From: Evert Rol <evert.rol@xxxxxxxxx>
- To: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- Subject: Re: sourcing a sh file in zsh
- Date: Fri, 16 Jan 2009 17:13:46 +0100
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=VEIfOtx5FTy606FLBY5CUCNZG7daYKMrodnMAeou2Jw=; b=xrwiiDWVjFpqtlG8Bu7YmfkRxLpyyED+zVYJM5/4higd4JWd09dmTVZ0WZOGiAKFf6 az3GX22h68o/GPpNUhRMUJpYzlY/UhgIa68MA78ij+rFVz3m/ouyh9aVDBrNpT2EJFKd ClTaPa+rfM/dvU26NiXQx5p+hCOk5HCN9wSwg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=PRQEjfpCFv4ORMmf8dMjTvzZKy9Uf2OiYdYOsBKqc8wDNIV2xoOw/4C04snclTm0vK Ig7MMyFhPnISDremz8ZAYCA8YJUX9gf61QcK3xBjxoAdDRdyLVWxHAI2NN0OggZllwEp u1W0YrG9E7z7529YugetLkCR5MF2k/TmViOiQ=
- In-reply-to: <2d460de70901160716ke6e1f86xe49ccc6391feef2d@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <BD9D2405-AD6A-4336-9C8A-85149165B6B8@xxxxxxxxx> <2d460de70901160716ke6e1f86xe49ccc6391feef2d@xxxxxxxxxxxxxx>
where that line reads:
[ "$a_root" = "" ] && a_root=/some/dir
richih@titanium ~ % zsh -f
titanium% echo $ZSH_VERSION
4.3.9
titanium% echo '[ "$a_root" = "" ] && a_root=/some/dir' > foo
titanium% source foo
titanium%
Can you try to reduce the script to a minimal test case which
still fails, please?
Yes, sorry, not enough debugging on my side.
It turns out the error is indeed not in line #1, but a bit later:
a_temp=`egrep "^[ ]*$a_host[ ]" "$a_root/somefile"`
If I change that line to
a_temp=`egrep "^[ ]*${a_host}[ ]" "$a_root/somefile"`
the script passes fine, with exit code 0.
So perhaps sh/bash are more lenient towards the use of braces in
variables. At least a quick'n'dirty test script shows this.
I don't know; anyway can comment on that?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author