# #Accept the string and checks whether the string is palindrome or not. # echo -n "Enter any string --->" read string length=$((`echo $string | wc -c` - 1)) i=$length revstr="" while [ $i -gt 0 ] do revstr=$revstr`echo $string | cut -c $i` i=`expr $i - 1` done if [ "$revstr" = "$string" ] then echo "String is palindrome" else echo "String is not palindrome" fi