Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: string equal problem



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