comparing 2 strings

hi
i have 2 strings. i want to compare the strings.
please help

if [ "$string1" = "$string2" ]; then
  echo equal
else
  not
fi

satish@123,

For basic usage like this you really should look at the appropriate man pages or tutorials, a useful link:

http://www.unix.com/answers-frequently-asked-questions/13774-unix-tutorials-programming-tutorials-shell-scripting-tutorials.html

Regards