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 program to check wheather a given string is
pallindrome or not?

Answer Posted / mahesh gupta

this script is written for bash :
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 ?    21 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of echo in shell script?

945


How to get the 3rd element/column from each line from a file?

1140


Explain about login shell?

1051


How to print all the arguments provided to the script?

905


What is the significance of the shebang line in shell scripting?

1039


Can you write a script to portray how set –x works?

947


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2701


What shell is bin sh?

900


What exactly is a shell?

1011


How to use arguments in a script?

1030


c program to display the information of given file similar to givan by the unix or linux command ls -l

2145


How can the contents of a file inside jar be read without extracting in a shell script?

1078


How does ls command work?

972


What are the various stages of a linux process it passes through?

1084


How to pass an argument to a script?

1088