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 does $@ mean bash?

1179


How to print all the arguments provided to the script?

963


What does .sh file contain?

967


How do I run a shell script on a mac?

1130


How to check if the previous command was run successfully?

1046


What does sh mean?

1062


how will you find the total disk space used by a specific user?

1052


What are the advantages of shell scripting?

1049


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

1292


What happens on a system call?

1025


How to get the last line from a file using just the terminal?

1234


How do I run a shell script in powershell?

1138


What is c in shell script?

1074


What are the different types of shell scripting?

1122


What happens when you type ls?

1004