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

write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

4120


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.

2774


What does it mean to debug a script?

1044


What are script files?

1026


What is the conditional statement in shell scripting?

1224


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2656


How do you debug a script?

1064


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

1165


How to redirect both standard output and standard error to the same location?

1159


Why is a script important?

1053


What is a shell in operating system?

1100


Tell something about the super block in shell scripting?

1023


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

1180


What language is bash?

913


What is awk script?

971