

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


echo "Input string:" read str for i in $(seq 0 ${#str}) ; do revstr=${str:$i:1}$revstr done if [ "$str" = "$revstr" ]; then echo "It is a palindrome." else echo "It is not a palindrome." fi
echo "Enter string:"
read n len= for (( i=0; i<${#n}; i++ )); do let "len++" done echo "length=$len"