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 does $@ mean bash?
How to print all the arguments provided to the script?
What does .sh file contain?
How do I run a shell script on a mac?
How to check if the previous command was run successfully?
What does sh mean?
how will you find the total disk space used by a specific user?
What are the advantages of shell scripting?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
What happens on a system call?
How to get the last line from a file using just the terminal?
How do I run a shell script in powershell?
What is c in shell script?
What are the different types of shell scripting?
What happens when you type ls?