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 redirect both standard output and standard error to the same location?
What are the two files of crontab command?
How to print the first array element?
Please give me example of " at command , contrab command " how to use
What is a shell environment?
What is eval in shell script?
Explain about gui scripting?
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
What language is shell scripting?
What is awk in shell script?
What is the use of "$#" in shell scripting?
I want to connect to a remote server and execute some commands, how can I achieve this?
What is path variable bash?
What does $1 mean in bash?
What is scripting autism?