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
What is the use of echo in shell script?
What does $@ mean bash?
How will you find the 99th line of a file using only tail and head command?
How do you know which shell I am using?
What language is shell scripting?
What is the conditional statement in shell scripting?
Write a script to print the first 10 elements of fibonacci series.
What language is bash written in?
Which shell is the best?
How will you copy a file from one machine to other?
Write down the syntax for all the loops in shell scripting.
What is shell prompt?
What is another name for a bash shell script that you might see?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
How to debug the problems encountered in the shell script/program?