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

How will you connect to a database server from linux?

779


What is subshell?

728


What is the default ubuntu terminal?

846


What are the different commands available to check the disk usage?

713


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

993


Give some situations where typing error can destroy a program?

966


What does egrep mean?

767


What are the types of script?

877


Write down the syntax of "for " loop

836


What is basename in shell script?

830


What is scripting used for?

801


What is the way to do multilevel if-else's in shell scripting?

987


What does echo mean in scripting?

811


What is a shell script in windows?

815


What is sudo command?

782