书上的例子 运行结果不一样。

书上的例子 运行结果不一样。

------------书上的例子-----------------------
[CODE]
freddy scripts> gender="male"

freddy scripts> if [[ "$gender" == "f*" ]]
More input> then echo "leasure to meet you, Madame."
More input> else echo "How come the lady hasn't got a drink yet?"
More input> fi
How come the lady hasn't got a drink yet?

freddy scripts>

[/CODE]
------------我的结果-------------------------
[CODE]
apple dict # gender="male"
apple dict # if [["$gender"=="f*"]]
> then echo "pleasure to meet you,Madame."
> else echo "How come the lady hasn't got a drink yet?"
> fi
-bash: [[male==f*]]: command not found
How come the lady hasn't got a drink yet?

[/CODE]      
[[ 后和 ]] 前要有空格