The strcmp command is used for string comparison in control structures.
strcmp varname string1 string2The value of the shell variable varname is set to a number that is greater than, equal to, or less than 0 according to whether string1 is lexically before, equal to, or after string2.