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
What is gui scripting?
How to pass an argument to a script?
What does $@ mean in shell?
What is shift command in shell script?
What does $0 mean in shell script?
How can you get the value of pi till a 100 decimal places?
What are filters explain sort with all the options available?
Can you write a script to portray how set –x works?
How can you find out how long the system has been running?
What is the best scripting language?
How to print pid of the current shell?
What language is shell scripting?
Write down the syntax for all the loops in shell scripting.
What is shell terminal?
Write a shell script to get current date, time, user name and current working directory.