Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / rag sagar.v

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 ?    410 Yes 149 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1250


Is shell scripting useful?

1003


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

932


How do I stop script errors?

1053


What is the syntax of while loop in shell scripting?

987


What is c in shell script?

1030


What is the use of "$?" Sign in shell script?

1114


What is inside a seashell?

1085


Is bash an operating system?

936


Explain about shebang?

997


What are the different communication commands available in the shell?

919


What is bash command used for?

1018


How to set an array in linux?

1139


Is scripting and coding the same thing?

946


Why should we use shell scripts?

1008