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

How to get script name inside a script?

1015


How to print all array elements and their respective indexes?

968


What is .sh file in mac?

1014


What language is shell scripting?

1035


How do I run a powershell script?

1144


How does ls command work?

1038


How to check if the previous command was run successfully?

1045


c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l

3769


What command needs to be used to take the backup?

992


What does egrep mean?

973


Is powershell a language?

1053


shell script for reverse the string

1407


Write a script to print the first 10 elements of fibonacci series.

2351


What is an inode block?

1064


What is shell geeksforgeeks?

1117