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

Why do we use shell scripting?

986


What's the difference between scripting and coding?

1174


What is option in shell script?

1012


one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

951


Where is bash history?

914


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

996


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

2202


State the advantages of shell scripting?

1049


How does shell scripting work?

1101


Suppose you execute a command using exec, what will be the status of your current process in the shell?

1064


I have 2 files and I want to print the records which are common to both.

1160


What is the first line in every perl script called?

1041


What is the conditional statement in shell scripting?

1227


How does ls command work?

1023


What is c in shell script?

1066