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
Is shell a scripting language?
Is shell a part of kernel?
Write a command sequence to find the count of each word?
How to print all array elements and their respective indexes?
How do I read a .sh file?
What is shell terminal?
Please give me example of " at command , contrab command " how to use
What are zombie processes?
What is a shell made of?
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
What are the four fundamental components of every file system on linux?
What is the best shell scripting language?
What is the use of .sh file?
How will you find the 99th line of a file using only tail and head command?
What is a shell? · Types of shell · what is shell scripting?