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
How do you know which shell I am using?
Explain about login shell?
What does $1 mean in bash?
Where are cowrie shells found?
What is the use of a shebang line?
What is the use of "$?" Sign in shell script?
Is shell and terminal the same?
What is meant by dos operating system?
Which shell is the best?
How to get the last line from a file using just the terminal?
What is difference between shell and bash scripting?
What does path stand for?
How will you copy a file from one machine to other?
what is info area how many types?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.