From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23823 invoked by alias); 17 Oct 2011 21:21:54 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16498 Received: (qmail 18505 invoked from network); 17 Oct 2011 21:21:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: <4E9C9997.3050306@mandic.com.br> References: <4E9C9997.3050306@mandic.com.br> Date: Mon, 17 Oct 2011 23:21:47 +0200 Message-ID: Subject: Re: What's wrong with this expression? From: Mikael Magnusson To: "Daniel Serodio (lists)" Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On 17 October 2011 23:09, Daniel Serodio (lists) 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