write a shell script to identify the given string is
palindrome or not?
Answer Posted / sathya
echo "enter a string"
read str
rev=`expr $str|rev`
if [ $rev = $str ]
then
echo "the given string is palindrome"
else
echo "the given string is not palindrome"
fi
Is This Answer Correct ? | 20 Yes | 14 No |
Post New Answer View All Answers
How to get the first line from a file using just the terminal?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
Explain about non-login shell files?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
What is a batch file used for?
What are the different variables present in linux shell?
Is scripting and coding the same thing?
How to print all array elements and their respective indexes?
What is the default shell of solaris?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
How do you find out What is your shell?
What is a shell script? Can you name some of its advantages?
How do I run a script from command prompt?
Which scripting language is best for automation?
What is ms powershell?