There are two special string comparisons operator to do this kind of operation :
Quote:
{str1'=='str2}
and
Quote:
{str1'!='str2}
gmic -if {{mary'='mary}&&{james'!='mary}} -e TRUE -else -e FALSE -endif
Or course, if your strings have spaces in them, you need to double-quote them as well.
gmic -if {{"mary is nice"'='"mary is nice"}&&{"james is nice"'!='"mary is nice"}} -e TRUE -else -e FALSE -endif
The command -strcmp is actually one older command that was used when these special string comparison operators were not defined in G'MIC.
It can be used like this, if your strings have spaces in them :
gmic -if @{"-strcmp \"mary is nice\",\"mary is nice\""} -e TRUE -else -e FALSE -endif
Hope this helps.