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 test whether a given number is even
or odd?

Answer Posted / karishma

echo -n "Enter numnber : "
set number = $<

set rem=expr( $number % 2 )

if($rem -eq 0)
then
echo "$number is even number"
else
echo "$number is odd number"
endif

Is This Answer Correct ?    19 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What can scripts do?

1067


What does debug script mean?

943


Is cmd a shell?

983


What is shift command in shell script?

982


What is @echo off?

957


How will you copy a file from one machine to other?

964


Write a command sequence to find the count of each word?

962


What is bash shell command?

980


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

1034


What are "c" and "b" permission fields of a file?

993


What is computer cli?

861


What is meant by dos operating system?

1013


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

1040


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

1463


Is shell scripting a language?

1000