The strcmp command is used for string comparison in scripts.
strcmp varname string1 string2The value of 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.