$ a=geek
$ b=geek
$ if [[ "my name is $a" = "my name is $b" ]] ; then echo yes ; fi
اول ممنون...
در واقع با دابل کوتیشن تفکیک کلمه انجام دادیم که اینو می دونستم...
اما در راهنما ذکر شده که :
Another feature of [[ helps us in dealing with parameter expansions:
$ [[ $me = $you ]] # Fine.
$ [[ I am $me = I am $you ]] # Not fine!
-bash: conditional binary operator expected
-bash: syntax error near `am'
This time, $me and $you did not need quotes. Since [[ isn't a normal command (like [ is), but a shell keyword, it has special magical powers. It parses its arguments before they are expanded by Bash and does the expansion itself, taking the result as a single argument, even if that result contains whitespace. (In other words, [[ does not allow word-splitting of its arguments.) However, be aware that simple strings still have to be quoted properly. [[ can't know whether your literal whitespace in the statement is intentional or not; so it splits it up just like Bash normally would. Let's fix our last example:
$ [[ "I am $me" = "I am $you" ]]
من نمی تونم خوب بفهمم...اول میگه که خودش میتونه آرگومان هاش رو تجزیه و تحلیل کنه قبل اینکه بش بتونه اونا رو تفکیک کنه واونا رو به عنوان یه آرگومان تکی قبول میکنه اما بعد میگه که جملات ساده همچنان باید در دابل کوتیشن قرار بگیرن!!!....آخه چطوری؟!!!!........