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 shell company all about?

1031


How do you find out What is your shell?

1099


How do I run a .sh file?

1073


When should shell programming/scripting not be used?

1215


Is powershell a language?

1087


What does .sh file contain?

998


How do I open a jshell in cmd?

1318


write a shell script to check the failed jobs?

4444


Is shell scripting useful?

1101


What is echo $shell?

1129


What are the different types of commonly used shells on a typical linux system?

1169


Is it possible to substitute "ls" command in the place of "echo" command?

1103


What is the equivalent of a file shortcut that we have a window on a linux system?

1176


How to check if a directory exists?

1270


What is the first line in every perl script called?

1097