write a shell script to identify the given string is
palindrome or not?
Answer Posted / kirtiranjan sahoo
read -p "Enter a string : " st
rvs=`echo $st | rev`
if [ $st == $rvs ]
then
echo "Palindrome"
else
echo "Not Palindrome"
fi
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
how to get part of string variable with echo command only?
What is shell prompt?
How does shell scripting work?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What is the use of .sh file?
c program to display the information of given file similar to givan by the unix or linux command ls -l
What is a boot block?
How do you create a shortcut in linux?
Given a file find the count of lines containing the word "abc".
Why do we write bin bash in shell scripts?
What language is bash?
What does debug script mean?
What does $0 mean in shell script?
What is wc in shell script?
How to get the 3rd element/column from each line from a file?