shell script to check whether a string is palindrome or not -Unix Program

In this Tutorial, I will explain how to write shell script to check whether a string is palindrome or not.

Program: shell script to identify the given string is palindrome or not?
clear 


echo"Enter string:"


read str
str1=$str
i='expr$str| wc-c'
s='expr$i-1


While [$s-gt 0]
do
  n='expr $str|cut-c$s'
  j=$r$n
  s='expr$s-1
done


echo $j


if[$str1==$j]
then
  echo"String is palindrome"
else 
  echo"Not palindrome"
fi