write a shell program to check wheather a given string is
pallindrome or not?

Answer Posted / mahesh gupta

this script is written for bash :
echo Enter the string
read s
echo $s > temp
rvs="$(rev temp)"
if [ $s = $rvs ]
then
echo "it is palindrome"
else
echo " it is not"
fi

Is This Answer Correct ?    21 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

determine the output of the following command: echo ${new:-variable}

757


Write the syntax for "if" conditionals in linux?

817


Why is shell scripting important?

768


How to print the first array element?

796


What does the sh command do?

827


Explain about stdin, stdout and stderr?

830


What is subshell?

705


What is the command to find out today's date?

858


What is @echo off?

772


what is info area how many types?

2512


What is the first line in a shell script?

790


What is another name for a bash shell script that you might see?

1229


What are different types of shell?

677


Is shell scripting difficult?

715


What does sh mean?

802