GTU OS Practical- 10
Write a shell script to check entered string is palindrome or not.
echo "Input your string without space"
read vstr
for i in $(seq 0 ${#vstr})
do
rvstr=${vstr:$i:1}${rvstr}
done
echo "Input string was :" $vstr
echo "After Reversng String Is :" $rvstr
if [ "$vstr" = "$rvstr" ]
then
echo "String Is Palindrome."
else
echo "String Is Not Plaindrome."
fi
Output
