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

Is shell a scripting language?

576


Is shell a part of kernel?

561


Write a command sequence to find the count of each word?

542


How to print all array elements and their respective indexes?

512


How do I read a .sh file?

532






What is shell terminal?

552


Please give me example of " at command , contrab command " how to use

2331


What are zombie processes?

572


What is a shell made of?

561


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

564


What are the four fundamental components of every file system on linux?

1168


What is the best shell scripting language?

542


What is the use of .sh file?

610


How will you find the 99th line of a file using only tail and head command?

2004


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

556