write a shell script to identify the given string is
palindrome or not?
Answer Posted / prasath
echo"to check whether given string is palindrom or not"
echo"Enter the string"
read str
Len=$(echo "$str"| wc -c
while [$len -gt 0]
do
ch=$(echo "$str"| cut -c $len)
echo -n "$ch"
s1=$s1$ch
Len =`expr $len -1`
done
echo""
if [$s1 != $str]
Then
echo "Tha string is not palindrom"
else
echo"The string is palindrom"
fi
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are types of shells?
What is the first line in every perl script called?
What is shell geeksforgeeks?
Why is the use of shell script?
What does chmod do?
What is a shell script in windows?
What is option in shell script?
Is shell scripting easy to learn?
How will you pass and access arguments to a script in linux?
What is bash eval?
What are the advantages of using shell scripts?
How do I open a jshell in cmd?
Give some situations where typing error can destroy a program?
Where are cowrie shells found?
What does it mean to debug a script?