Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: string equal problem
- X-seq: zsh-users 15837
- From: Wendell Hom <wendell_hom@xxxxxxxxx>
- To: Lyre <4179e1@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: string equal problem
- Date: Mon, 7 Mar 2011 01:15:29 -0800 (PST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1299489329; bh=7MnQoxMkY7rAoPvKzBRmd+ntAVgngJ/583Q2ixJLiRU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=NtTn0Lr1DNc0T7nsIfXiJzV+g1A7O06HHSsbnGSUvcf0/Kv1UhjscUgdZAflt/aiTZ9RQJysCiwGKW6zte116ji7Yq1InsTUQ/+sSfIF5oQF1R3Sd5MmvlLQDprqxD6kJSXVvCmk2iS2z5Icy/RGsHlSIf4IqIPFMXYnybNPo9E=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=QiIvG1X6r318JOWw2OkPAAY/rePs0wqmCYaSdwH3FbnwuHbC8GssQlHydFjRTAri7LqYiXxq0zV45KASj5bTtw81FKxN5dtM5XyrXRpi3EqZNwJZuhkE9zsowMhTeSOuXkQul4CShEsvdFCACkT1Ep/+K1xxhLcDqm1GUoLC6wk=;
- 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>
Your syntax is off, it should be
if [[ "abc" == "def" ]]; then echo y; else echo n; fi
-Wendell
________________________________
From: Lyre <4179e1@xxxxxxxxx>
To: zsh-users@xxxxxxx
Sent: Mon, March 7, 2011 1:04:48 AM
Subject: string equal problem
To my surprise,the following statment:
if [ "abc" == "def" ]; then echo y; else echo n; fi
doesn't work, it says "zsh: = not found".
Then I tried it in several version of zsh (4.3.x) on different distribution.
All of them doesn't work, except the zsh 4.2.0 on sles9.
What's the problem with it, is there something wrong in my configuration?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author