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 / kirtiranjan sahoo

read -p "Enter a string : " st
rvs=`echo $st | rev`
if [ $st == $rvs ]
then
echo "Palindrome"
else
echo "Not Palindrome"
fi

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inside a seashell?

1185


What are the two files of crontab command?

1304


What is basename in shell script?

1102


What is option in shell script?

1060


How do I run a shell script in powershell?

1176


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

1349


Why is it called a shell?

972


What is .sh file in mac?

1049


Which is better perl or shell scripting?

1037


How do I run a script on mac?

1150


How does path variable work?

1034


What can you do with powershell?

1191


What is console line?

1022


What is shell scripting used for?

1040


How would you compare the strings in a shell script?

1031