write a shell script to identify the given string is
palindrome or not?

Answer Posted / sunny garg

echo "Enter the string"
read s
echo "$s -gt temp"
rvs="$(rev temp)"
if [ $s -eq $rvs ]
then
echo "it is palindrome"
else
echo " it is not"
fi

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a beat in a script?

639


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.

890


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

860


Is powershell a bash?

666


Explain about non-login shell files?

799






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?

799


Explain about return code?

708


What are the disadvantages of shell scripting?

728


How to debug the problems encountered in the shell script/program?

717


Is shell a scripting language?

664


Write the syntax for "if" conditionals in linux?

677


What does $1 mean in bash?

700


What is scripting autism?

787


Is it possible to substitute "ls" command in the place of "echo" command?

702


What are filters explain sort with all the options available?

1037