Script to check given string is palindrome or not.
echo Enter String read str length=0 cnt=1 flag=0 length=`expr $str | wc -c` length=`expr $length - 1` temp=`expr $length / 2` while test $cnt -le $temp do rev=`expr $str | cut -c $cnt` ans=`expr $str | cut -c $length` if [ $rev != $ans ] then flag=1 fi cnt=`expr $cnt + 1` length=`expr $length - 1` done if [ $flag -eq 0 ] then echo String is palindrome else echo String is not palindrome fi