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 bash coding?
How to calculate the number of passed arguments?
How will you print the login names of all users on a system?
What command needs to be used to take the backup?
What are the different variables present in linux shell?
What is a shell made of?
What is a batch file used for?
Is shell scripting a programming language?
How to debug the problems encountered in the shell script/program?
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?
Explain about login shell?
Where are cowrie shells found?
How many fields are present in a crontab file and what does each field specify?
How can you find out how long the system has been running?
Why do we write bin bash in shell scripts?