2006227-OS Lab Assignment 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Nehee Bokane

OS Lab Assignment
2 60c 22
woite o ghell soript:
IT-4

ct n H: M:S
d o uput tutime in seconds auel wrute
bin sh
edho u b e » time i Jeouds:""
Tead time
CCh=time/360o))
CC m =
time7 3600/6o))
(CS= time 7: 6o))
echo 11
The ime iu H:M:S uà$h: m:$s
Out put:
tunte time iu seonds
12qq
21:39
The thme iu H: M:S i
ad swapthem wittout a
wittout a
Jo iuput two vanabla wumbos

4uiud vauiable. .
2.)##1biw
echo
s
eLnte kust nuwmbe:"
ueLd
"
edo eunter SecDud number:
LRad b
edho Before Swap b"
Q-((ab))
b $ ((a - b))
a -
Ca -b))
ecko Aer 2u0mppug $a
(
nuwmbers aud swap tem wit
+luiuol vaniabl
To iuput tuoo
a

3) #biu/sh
echo eunler tirst nunbe "

Lad o
e clho entu LLond nwmoo:
9Laol b
8Mddvmy naths
99 rdduery aupa
9
mdtno
4) Joknd gruae amongst two uuumbes.

+##bin|s
eho u
ente i ust numbe"
Ladl a
eclo" uwen aeLond nwmbev"
9uad b

hen
echo a w queatatE"

ehe b us quadest
Ouwsput
nker kst numb
8

guunhea
3 umbes.
)To hud quealest cuony

+# bin h 1
edo "
eusa tea tixst nuumbir
Lad a
"
eho" eunte tu &ond number

Lod b
hwmbu"
Cco ene tt tind
d c
L a -gt b] [ a -atc
ten
uabest
edho a us
L b -t ]
elLsb -4 fa] &

elib L$c-at ] 3 [jc g+


echo e quuakut

ecuo " enwr"


Output:
n nst unb

en 2usnd numher
2
nn teind numbeu

s9Latest
finding au
To displa adin4 Dhuml b
nuled i ela
)o mauks n 5 uh jecks uaiug
s

6 #1/bn |sw
edo ta maka S AubjecH
ad sl 32 s3 su SS

eLen
Cclo pade is 0"

echo"eunde is E"

el L$g ge7o] 22
L aua -&o

edo uade is A
e LFavg e 6o]&& wg - 3o)
d u B"
88 (dawg t 6o
So]

echo pade is C
CLtas-geuo] awg-ASo

ela aug - 34
ecluo f a l

Output
Cten asks aS ubjes:
49 98 96 94SS

ad O

(add, subtrat
puoM olituuut maktemah col opvah
on
To

nuuthpy ,dividh, nod) a


diuhcoses al Awireh (oae

elo u e 2 unbeu:
Aao a b
edho &aluct o paahgu
ecuo . A dlihe
edo "2 Sub hacion
echo"3. MuQipli'cakion
ecdo 4 .diviston
eco us mod"
JALod

You might also like