• Source
    1. #
    2. #Accept the string and checks whether the string is palindrome or not.
    3. #
    4. echo -n "Enter any string :"
    5. read string
    6.  
    7. reverse=`echo $string|rev`
    8.  
    9. if [ "$string" = "$reverse" ]
    10. then
    11. echo "String is palindrome"
    12. else
    13. echo "String is not palindrome"
    14. fi