Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: string equal problem
- X-seq: zsh-users 15835
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Lyre <4179e1@xxxxxxxxx>
- Subject: Re: string equal problem
- Date: Mon, 7 Mar 2011 10:13:01 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jG1/s4JoOx4VtlUeRsndVaAHF07w5arqPl/38bdLLRc=; b=ewHI6KbSUPVh6Yq7MCS2Kty4DMpw9yptSIwYp0SAN9ciPQRWfv6SLrnKwalACZ4WKc mog0mPU1D3NM8ZVGb82mOODDKFBaTdORfjT1Avd9BETLKwxGUSgnsKbDUuuBgH32WIDi yLPZnHkZGOL8cYMO6H1TfZNCTakmdHKAknda8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SoGfuPmm+wm/80L5egnHszqUl0EPirMw5ooHX5YFKEHaPudI5fw00OzxpkOwo58lNi bUn2WE1faFMscG6hT2rOR0z6o2js08mTUTwc9NfJYehR9qAwEzNiMX7v5SHa0WJP2F2Y x5E1dx7LG5ueJOUv7B9wybMEbNCd7INMKDZts=
- In-reply-to: <AANLkTi=GJPW=cVoA5hxbgVLsVMpeFehiZFjjU-dd04ow@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AANLkTi=GJPW=cVoA5hxbgVLsVMpeFehiZFjjU-dd04ow@mail.gmail.com>
On 7 March 2011 10:04, Lyre <4179e1@xxxxxxxxx> wrote:
> To my surprise,the following statment:
>
> if [ "abc" == "def" ]; then echo y; else echo n; fi
>
> doesn't work, it says "zsh: = not found".
you want either [ "abc" = "def" ] or [[ "abc" == "def" ]] (= will work
in [[]] too).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author