Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
Operating system lab

Operating system lab

Ratings: (0)|Views: 117|Likes:
Published by BHARANI DHARAN.K
Operating system lab Manual by Maha College of Engineering
Operating system lab Manual by Maha College of Engineering

More info:

Published by: BHARANI DHARAN.K on Aug 20, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as RTF, PDF, TXT or read online from Scribd
See more
See less

05/13/2013

pdf

text

original

 
3. SHELL PROGRAMMING3.1. SQUARE OF A GIVEN NUMBER 
PROGRAM
echo "Enter a number:"read nsq=` expr $n \* $n`echo "Answer is: $sq"
OUTPUT
Enter a number: 4Answer is: 16Enter a number: 5Answer is: 25
 
3.2. CHECKING EQUALITY OF TWO NUMBERS
PROGRAM
echo "Enter a:"read aecho "enter b:"read bif [ $a -eq $b ]thenecho "The given numbers are equal"elseecho "The given numbers are not equal"fi
OUTPUT
Enter a: 20Enter b: 30The given numbers are not equalEnter a: 15Enter b: 15The given numbers are equal
 
3.3. GREATEST OF TWO GIVEN NUMBERS
PROGRAM
echo "Enter a:"read aecho "enter b:"read bif [ $a -gt $b ]thenecho "a is greater"elseecho "b is greater"fi
OUTPUT
Enter a: 24Enter b: 12a is greaterEnter a: 15Enter b: 20b is greater

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
sujoy.bhowmick liked this
shubhangi liked this
Adri Jovin liked this
Adri Jovin liked this
BHARANI DHARAN.K liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->