Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What's wrong with this expression?
- X-seq: zsh-users 16498
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: "Daniel Serodio (lists)" <daniel.lists@xxxxxxxxxxxxx>
- Subject: Re: What's wrong with this expression?
- Date: Mon, 17 Oct 2011 23:21:47 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BRNmoRqE2sI74Zflm6Zm42JLfl2MQ3HqxBoQh2W2APk=; b=sg7UCuFJiXRxme+YNI97BOIXyNBbxD6RhT7xqx57UEuvGuRO+Naqf8OZ+uERX2Ywd/ pqQBPPOI4PhqMmwmNtTgT6H2g9A5Tw8VLJCM3pvnggZODEfn41XBEeiRQMepJO2cJYo1 7dZZY+O4hA7+RQVlbt+rfQE34KSAlJcR1+ye4=
- In-reply-to: <4E9C9997.3050306@mandic.com.br>
- 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: <4E9C9997.3050306@mandic.com.br>
On 17 October 2011 23:09, Daniel Serodio (lists)
<daniel.lists@xxxxxxxxxxxxx> wrote:
> I'm trying to troubleshoot a script that works with bash but fails with zsh,
> and it uses the "regex match" operator. What's wrong with this expression?
>
> [[ "foo" ~= "x" ]] && echo true
>
> Fails with "zsh: condition expected: ~="
You wrote ~= instead of =~
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author