write a shell script to identify the given string is
palindrome or not?

Answer Posted / sunny garg

echo "Enter the string"
read s
echo "$s -gt temp"
rvs="$(rev temp)"
if [ $s -eq $rvs ]
then
echo "it is palindrome"
else
echo " it is not"
fi

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do scripts work?

618


How to write a function?

606


How many fields are present in a crontab file and what does each field specify?

602


What is the use of echo in shell script?

549


What is a shell script? Can you name some of its advantages?

538






How to find duplicate record in file using shell script?

864


How can you get the value of pi till a 100 decimal places?

561


What language is shell scripting?

586


What are scripts in psychology?

606


Is shell and terminal the same?

602


What does $1 mean in bash?

621


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

560


How to redirect both standard output and standard error to the same location?

650


Explain about the slow execution speed of shells?

783


What is a batch file used for?

570