OSY PR 7-10
OSY PR 7-10
OSY PR 7-10
~.-. J'-J illl t' of l<l'~ourn• U, ua1I ~,11•dlfr11llo,a ()11a11llt y kc m:.rJo (If au })
... '"· l<AM -
l'tl lL\ '\ \(IJ (11 1~
).
( \1111p11lc1 S.Y'klll 2Cill ,111d abo ve (!\ , per
nl·rd of O,\J h1 r all
---- 111 \ , L1t1t1.~ /IJh11111u /uny
A, fll' r h;1t, h
Srtl /· xp crrrrr cn l!4
lJ
, Opa,111111,? S~ kr n oil ier ClJlL'n 'iourccs
Oj)L'rar111g..:'l):'slcrn
.. --
lfr wu rc cs Wi ed (Addition:11)
I.\ ..
- sr.o."/ .\'a m( ' of Re so urce Broad Specification Quantity Remarks (If •nJ')
1
-- \
I
-
Computer System I
., Operating System
Ub un ¼ I
-
- to students.
st ass ign a se pa rat e pro gra m sta tem en t
he r mu
.\ . Pr og ra m Co de : Te ac slructur c
l . Create the following
' MSBTE 1,
{ sc~~me J
( I scheme]
I
I
EJGBB fig ur e 6
◄
I l,1\\ 111 ,l11 ll Irn111 R1111t d11 '-'ll111 y to l 1,l'r ( I lomc) d11 cctory?
' If,," 111 ,ce d1n.·rh1nl·.'°-'
1 \\ h.11 ,~ ,kt .,ull Sl't of rl·m11,~11111~ µi, 1.:11 hy thc system to the directory'!
~ ·\"1~11 JII the pcm11~:-.w11:-. lo ynur d111.:ctory for all the user~ using symbolic auu
1,,:1.tl llll'lh1hl.
~ \\ h.11 ,s d1 ffl·rc-ncc h1..·t\\ l'en co1111n anJ cmp command?
.. ··········· ·· •·· ······ ·········· ··· ·········· ·· ·· ·· ··············· ···· ·· ·· ······ ····· ·········· ·· ········· ·· ········· ······ ············· ........
-~··· ···· ··· ················ ·· ·· ························· ··· ····· ·· ··········· ··· ··· ····· ········ ···· ···· ······················· ···· ················
',
........... ·· ········· ···· ···························· ···· ··· ········· ··· ······· ················· ··· ······ ······ ············ ··············
_I~ . .:.. ....~.~~.~.~:\ 1.!J ...... pf.~.~.!.Hi.P..0.S. ...... f ~.~ .....~ ...... ~:.'.f.S-.f.~J······!·?. .....9.7.?.7. ..,... ::
... ........-:-r, .r ..... ~ .'. '. :.:L ..~.~.~.......P.r.~. ~ .U.~./.~J:'l. ... ~. ~ ........(ff. C ...... :~~ .i:-0 ..... @~ r.t ...
. •. .. ::- 1- r . r !.r-1. c_1! .( ~ J-....... .l..1. f\~ .0.~ \ ....... ~ .0. .1.~ .e........C. ~ J .J..........1. L ... ~..~~.~,.~.~. ~....'¾
1
3' i . . . : i.~.~: .. .... 0.!~~.~·~·f ......(r.~J~.~.<l...... JJ. !::.S....... ~~ .....0.:,.i:-.f.r..~q:-J .... f:t:'.{J!\~.~.i~r.
r",-·;.:<: ~:~:~~::~~::·: :f~:; :~;~;:~:~:i: : :~: : : : ~:i\; :;: : :~~:; :; ~: : : :~:~;r:~:,;.i ::~;;;:;: : :
•• • .. • • • . . c ! r ~',, 1........~.i: ..~.[ :.'.~.~.; ..... ~:~'. c:.,.:....':.~:.....~.~ ...... ~:r.r.L ..t?:~~······
1..... ~. ~ ~'. .. ~.......... ;.
1, .•-'h ·,,,, rr(t,i;f'(r,l,nq l'1Pf in J~t> c-,-,'-0~ r-:k (...
.............. ·. ....... ....... :.................. .. .............. -r .................................. .....--:·......... :...... ............ ~ •.••••••••.
q~rnr1 le> S ~ (c.1umn Ctt l()1\~ ...
.... ····· ·······1· .. ··················· .. ········· · .. ·········· .... ·.· ············'········;······ ........................ ........................ .
...... .. ...... ....... ..... ~'. ,i.i:: i.'.; .:.. :......... .1.. J ~ .~~ ........~. '. ~ ~ti:i.~.rA. ....... ~:.'. ::. ~.':.:::i.~ .~......................
MJharashtra ,talc lloarJ of Technical Edu1.:ill1on 40
-~ I I
I• j ( I f
I '
....... .
•~ r, '-' , r
" ·,1••• 1' t'•.: 1t ,_ p..:rrnJ'>'>toni, a,,1~n1..d to thl! fik lik!) alkr c, . .•l·u111 111 ,)f f,,11,," 111:!
<.' •·," ,1:-.d , I
.J ~-~,r:,, ...J 71>1 ;il>c
-- ----· ---
Mih.an,•htra ,t,1 h:
- - - - - - - - - - - -- -- - -- - - - - - - - - - - -
B,,;ird of ·rc<.:hm<.:al f-.docauon
--- --- ---
.,
t, I\\ I \I
( I ,1 ,1 \
\\ 11\~· \·,,mm.11hl:-. hi
11,-.;il~" folluwi11µ pnmi._._,ons to
llKll1,,,I the file OSY u, ing symbolic
..... ... , ... ... ... ... .... ...... ... .. .... ...............
'J ,t ..... .. ...... ..... ............. ....................
r 'r . ,..,.. ._,4 •~I ", n hc .. .. .. .... ... .. ................. .
• I
!' ,' ,,
I "
J
l • I • I I
' , ,
( t I I
' I' t I
r l);&t-,•d ~i,:..;-a,un or
Mark~ Obtained Tt•ach~r ______ .
---- - .
• - __ .,,_ --- - - - - - --- ~-J
43
Maharashtra state Board of Technical Educalion
!'i11111r of k t\o u rl'l•
Ill""~ 1
l 2. f\ ,., I f, t• j,
t
,11 ..
s
.·r.
\ :mil' nf kt·,ourn,
""· lhoa,I \ IH·,·,n .
ta 1ion
1 f)ltilhhh
"' .. ,,_.,
M, "'·"" '
2. 01''-'r,1ting Syskm II
\. Prn~ram Code: Tcarhl'r must .•
-- ·
i
\\ rit~ th~ rnnHnands for: assi~n a Sl'pa raic J) ro~ram ~ta lt·mt nt ,,,
,tudtfth.
Counting numh1:r of \~•ords in the 'data.txt'
Count mg numhcr of lm1:s in 'data.txl'
Counting all characters in the 'data.txt'
Note: Belo w given are few sample 'fll£'stio11s for rcfamc~. Trud,,., .. ,.,, "'°';~,.
1rwre .\Uch q11e.1i·tion.'i so as lo ~m.-ure the urlr i,,,.,.,,,<'111 of iJ,•rt1ific·J CO.
I. Give Applications of Paste Command.
2. How to move cursor to end of a li n1.:?
3. What an.: the optio11s of wc command?
4. What arc difft:rcnt types of filt ers uscJ ml inu,·.• .. .
5. What is di ffcrcncc between $cat ah~ athl S'-'at ,1h,· :11M\' (hie 111'· ~h.1ll ,·\,n, ,~t-. "'t
more than 25 li nes in it)
.....
;.~-------:-:::-:---: -:-:=------- · ;,•-···-- --------------
~ II state Board ofTechm~al Educ:alion
'
1•
I
I
.~........ .......................... .... ................. ..... ..... .... ... ............ ......... .... ... ........... ... ............... .................... ............ .. .. .
_
~~
······ ··· ·.. ····· ..................... .......... . ........................ ...... . ............. .. ......... ..... .. ..... ................ . .......... ... ...... ............ ....... .
::.~:.~:........(·.r.~.; .~. 0. .~.. ::-: ................. ............ ··············.................................................................... ..
········ .. ···· ··· ........................ ... ......... .. .. .................................... ............. ... .. ........................ .......................... .
.. ...... .... ....... ~..1...... ..~.~............ p~.1.0~.~ ... ~~.....~~~~.~.~?. ... 5?.f.. ... !.!:.~r .... p..rgJ:.:.\ ..f.0... ? ....F..~~ .
1
....... ..........:-:..w.....~ .............. f?.'~ ~.0 .: ~ ....~ .~~ .... ~~.".'0.~.~?: .....~ F. ..... ~.'?. ~.~ .~ ... .r. :.~. ~ .~.0. ~ ...... '.0 ...9..
..{:i le -... .. .... ..... ..... ......... .. .. ............ ............. .. ......... ... .....
... . ...... ................. ...... .... ...... ....... .. .. .. .. ............................
.... ...... ..... ..:: ...( ......~ :.............9..~ -~i .~.':i ~......f~.~··· (~ ~!~ \ ... ..~r .... ~.~.~~.~..... .r~.~f0. ~ .. J0......... ..
Cl. +ile .
........... ... ...... ............... .. .. ... .... .. ................. ... ....... ................... ... ...... .. ..... .................... .. ..... .... ..... ..... ... .....
................-:..~ .... ~-.~-.. . .........p ti r.':~ ~.... ~ ~~.....~~.'! ~ .t.... ?. ~.....\ ~.~ .<?. ~. ~~ .~ •••~~..P.... f·.'.~ .. ..
......... ................................. .... .. .. .......... .... ..... ...................... ... ..... ... ... .... ........................ ... ....... ... .............
XI If. Exerci,c:
1. Write the significarn.:e of following.
i. Only one character is specified
$ pa\lc -d "I" number state capital
I IArunachal l'radc~h lltanagar
21Assa111!D1spur
3/A ndhra Pr,Hksh: Hydcrabad
4jBihar!Patna
51Chhatti~grnh;Raipur
iii. -s (serial), Combination of -d and -s, - vcr~ion (write its syntax and
nampk)
l. Create a new tile and practice executing she ll commands from within th e edi tor.
Capture the rc~ults of some shell commands into the ti le.
2. I low to get help?
...~ .. J.1.i.~...... :.-...........I .~...... ~·.~.~r.~(f...... ?.P..~.~.\.Li.~.....~~~.~.r:1::~.~ ..... f.~.::.: ... .?..... ~.;.'.~... :.......... .
..~ ....~t'?..?. .....t . . . ~.~'.!.! ....:~......... ?.~~ .....~.~.'.~.p..~~·j······--·~·~·~······~.1.~.~.~.......~:....... ~~..~} ..... ~~.~... .
line~ cf C1 fi'le
··············································· ·· ······································································································
.. ~......~~~........:.~....... 1.~..... ~J!~~~.....:.1.~... ?.~.~.?.~~-....~~f. ...1.1.~.~.~ .. ~~~~~.~---J ... 5..~.~~?.~.~l-f
1.••
,n ...\he clo1<.1 .
·······················································································································································
.. ~: ............... ................................ ................................................... ...............................................
. ~~..-:........~.~.~.....~~.i.~.r~~.i~-.....~:~~.~:. .....~.~~.~½.-.~.~t.: ......~ ..~.....~~.~~~ ....~:·.~.:-.../.~.....~~.1.~
· -""~ co0-l-t?0~ .. ... ~~.~-~~! ..... ~.~.~.....~~~ ..... ~.~:.~~.0...... ~.~-t~!.~.... ~.e \J;~u.> i ~ ,
............... -:i~.... ~·~·~~~~·;~J 'r)~t,re' i~ lr~e. ~ po~~ tuhich ii-~p;·~~·~··· ➔"~
Maharashtra state Board ofTe~hnical Education
SI
(-.:,"\.1'1'''
················~
f"'"'). ht~ ····f·····
..... : ........•.. ~ .. ~1.'-........... ·...
P<l]l' ... . :.. ............................... . . ················"········· ·· . ........ ...
j '
7
')(I ,
. . ···· ··· · · ··::: : : ::::::::::: : : : : : : :i.i,j: : ~~;~: :;: : ~;:~;.i: : ~~i~~~~ .
i~; :
....
~ :~::§;~;;..~ ½'.....*'~.~. . .'~~:.~.~•··~.~!..:.....J ..........9...:..Y~.•~~
<' , -.u ..,:~. .....
? .. ':"."-' . i:~~ ... ....
~~
....~......... .
.?..b.°.~.'.". .....c.~.~.•.~.....!.o. .~~~2.:........ .
. . .......c~~~·~·:;·1.- -o 1 -o
59
~1JhJ,J~htra state Board of Technical Educauon
..... ·······. , ..
·•·• ... .. ······ ·•· ··· ······· ····· . .
··················· ······················
···· ··········................... ......................
.~ ............................... ........ ........... .............. ............
.......................................... ......... .........
.i\( '~ \ - 0.
....................... ..................... .... .............
••• 1··~ ··~ ···· ····
c:::_ € \.: Y'I\..\ .......
· · .. ·:·· ::: • ••• •• ••••
.............................. .
.. :•;· ·~· ·· · ..~j
• • •• •••• •••• • •• •• ••
··········· ·········\~i::~ ..... :.'.~:. •• •_. .... .... .... ....
(, I )
C'
e (-' ! ' r 'j
···•··•· .... J
2 --:Ti 1 sa· t n, t cI c
.. _ 1 n -I his
- -·-- - - ···········
···········
---- --·-- -------- --- ·········· ·
61
I r _
I
L_
I
... _J - - -
7
I
--- I
,.J \ "'
}., -~ --
I c: ~ C\ ✓e. Jh e .f,ie 0
.,
~,
'1
: ,I. .
f\ f.~ .,
~ -,- .
C ,(\~ec 't ~e '(t Q\; 4, e enJ or 1:ne. ,n \)1 rJ :.ior
I
...
l. Press 4 e [ sc
I •
mocJe.
2. t-.1t.fe. ...\he (u. dc '< Jc -lh e fn d c .+he 1. 'ne
h, -\he -- -= -- --
ri: loet:·i'f'efl+ ~f'-x+ I
t 'l';t,ll 'lh' "' ,1,·111 1.' .'~I(, I
............ ... ..
...... .. ..........~·~·\···· ....................................... ...................................................................
. . . . ..........................
,. I kt~ ...........r..~: . . . ......................................... ......................... ... ... .
'="-............. rnu\.i..; I ,~ ~.~
t C''l<.. ..l-.........
-from f fq,~
.. .. ..........
let&.....-:: ... .............. ...................... .. ......... ... .................. ................... .
·J .........
..... ... .......
( c 1'0 fl"'Clf' d .
································································· ······················································································
·················
··························· ·························· ··········· ················· ············ ·········································
······································ ··· ············· ····· ········· ·································· ·················································
4-,.<; ·- s rid ······ fi' le
... ............ ... .~····f··· ·· ..
- n r<)
.......................... ......... ... .............. ........ ................................................... .
r--ur u 1<.•. ( crnrnc,nrl £
··············· ·: .....................................................................................................................
................ .
()un E -,c i l Cc,,·Hnoncl S
·························· ····················································· ········································································
.......... ......<:.~. ~ ..... :~'.~ .:. .:-. .~.~ ............. ............................ ................................. ····· ........................ .
.
:r············································· .. ··························· ················· .. ···········--····· ....................................
,,
r~od <:Jiad e
i~ [ .1;9tode -~e, 30 J 4 ~ [ $ c_J'cirl~ - Ip J CC]
-'hen
echo "G"1r ade ~"
f:';
ir [$ <3rcide - je 7, J ff [i a,,, 'c J~ (JO J
.Jhe n
e c\-io ,, LT1rnr4.E> 8"
Fi
j~ [$ 1rude -Je 5C] 1-!- [ 't qwc-4e., -ll
.J
7e,J
-then
fi
iC [ ½~r:i de -je 35] ~~ [ t 9ra de -fl '5CJJ
XI. Resul t (-Output of Code):
·l-'···"····............
···-'····h·..........
·········r~··· e·c·~ ~·...........
· ··~· ··c..~;~·J ·~· ···~· ·;,· ················ ···· ·· ······-···················· ........................... .
........... ...:~........··········--
.,._, ·············•····························
.... ·.,·.r..... ir ..
•
·········· ·······
•Q•··r•t•l·j•e··.• .... •~--,· •, · ..... •s•.. ].. . ...... ..... .. ..... ; ~ ·:· ........... ........... ......
.... ....... ... ... ... "j··--::·············.~······3······:.. ··· ....................
r - \. t" -""r- •········· ·• ............ .. -.... .
~ ·······--···• .................. ..
t c ~o ~ n'! L f; .................... ..
X 11. Practi cal Related Questi ons
.Yore: Below Kfre11 are few sampl e questi ons for refer~nc~. T.
.
more such q11t!Stions so as to ensure the achiev ement of id~ntif iftl ~ •,ut tln1,:n
A. \\/rite and execut e script for n~tcd if statements. O.
B. \\'ritt: ditTcrence between
I. if[ condit ion]
~- in (condi tion))
C. \\ .rice script for finJing greatest numhc:r among giH~n thrft ._._ 1!r
11 11111
J
_..i ~
'"t.' h'\I-~
_ __:_
~('
·-- --------
---------- - -
t ''
t'ch 0 '' r L., eif S k.lclf-'11 ~-- : ___ ____ _
t n~ pet .ce11lQ3e
... ---- _ _ _ __ __ _ _ __ _
rel, d ~t-ctc-.l_e_ ____
i~ [ S 9rqcl e -f~ 4o _J _ _ __
-1..h~n
- - -1
e cho " PC\S ~ ''
€' \ So
fi
------ ------ - - -
-- -
fn -1-<.- t r~teE ~"
-'"-l '-, 9e cf Stv c-J~"•-+·--
1 e cro
11
-'--l·wn
-------
echo '' (--1r-ode. _1 _·~-- -
._ , e ,~~ ( 3 ~rQde -=1e- S◊ J---·- ~--::-_: -::==::-:=::..:-::--.::::::- _-=-:t:.:.::..:.:- --=.::.::.-:-.:...· -
---·-:----=:-==-=-=---::-=~--=---==------==----:-:::---::----::r::-- _-- - =
---
I ', .. , ,,..
-.
I 1. I~ . ,.
\ l '· l
- I l I• 1
..)
• l\ ,\1 "
- - ----- - - - - ---- - ·- -- --
-- - - - - -- -- - - - - - - - -- - - - - - -- - - - - -- - -
. . \ ..
- -- -·- - - - - - - - -
•
( " \. , \
\ ~1 l '-"'J ( . t:. c '·
- = - - -- - - - - - - - - -
- - - ----
,. ~ - h ... ,,
'l. u
[ t C\ r a c\ e - e qa J
1 .f r-0u,~ \e . Sh
e-e ce n -\-o e
?, 7
~ I
.... --~ :::. Jo. j
---
I
' ......
/r
-~---- ~ - - - - - - .....
- . ....
r~ , ,., n J
l:r--:--
~
::2!!!~~ ~
- , f. _ .... n))
I ( ( r ru ,} , i; r
-- -- ....
I
- -a
1-=-~-Cc.
·- .
....
,,,.-- l -ri,
... t-
f ~ 't,j lL
1
~'l< H~f /\
"'---- '----
r- J
~- - -1~. ,. ,I, l}',I, ;, [,'l> •of • ~,
,, I ( r • ,'J ....
__.. A,-
1/ i s -1ht' r, ,·,,r0"r,,.,l f •H;, -{ , , '' ~ !, ' ~ ,, \-, ...
..- *-
1,......-1 ...
l1
i
Q,. i I l,r, ,.,t;r ~--- -( ,..,, ( ~I I . ("
L----
~ '! ...
I
...--- I ..
L.- - ·+o ioJ ~
J4 is us~c~ ~u ( r Pede. "J ~ i& U~,~J '1 r J
r- - - (Cr<1fY\of'\c-L~
i() '-~ l.o l-t· mP()l r
,I
I
o..t ;Jh r0~ ~c tJ r,("•> ri L,:_ r- ~
..
i
I
r..---
.
S~<11a 1 •-
~
Sy r~'J Y '·
.--- I i r-
I i~ lfDncJ,'.J.;cn 1 I ( ( ~cl"~;.i_;Ot"~)
- j ---l hen
·1
I
..!h €.r'\
- Set ~el ti~ CcdE' qceJ ~.l.c ~e ()~ ~ce., ~~ e..
I # #di
- ~
h12tc.
·' i'
I ~-
' -f; I
I
I
~
C
~~ ,, ~0.l-e.t, n u"""be-t J t"\d rfl \-c:>e .:'
' •
t,.:ho
tel'ld f\J
f'il l\i\\,e ?'
.. ,,
ec hv " ff'l kt. n lln,b e ?" 2.
r1=--od fl2....
,,
,, r {\\ l tY\h f' t, ~ t'ILI('\" bt' t ~
...__ f'chc ()-l{ ' t_.
tf'c id n3
~
~
ir r <1 "1 -9~ t n1 l {·' 5- r-~ "j -9+ tn i)
-l hE-.n
-- '' I I
s (\j is qrP cd- ('t"
-- ec"' c
er;,: [ i n 2. -9~
-
-! n'! 1
t--.. .
~- -----
- ·- -
. -·--
I -
-- - ----- -- --
-
----·- - - - - - - - - - -
--
...
I
E-------- ·------ - - --
he, " !
t _... (
--- - - - - ---
r,:\ is t>1t r<1~t ''
------- -----------
..._____
~--- - - ---- - ·- --- - ·-
_f j
Cl u ru t. . -
t
Yb
~ f"\u.mb e.e 3 numbe-t- ·
,o is C1req-l.et .
l>r,·r:~~ll~f ~~,1~11~ 1}~2._i_~) --
.
..
·········· ····································· ........ .......................
··················· ······ ···················· ············· . ··· ··· ········
.
············································.... ...................... .......
······························ ···············································
········ ···' ....... ... ...... .. ·~ ·~·~·~·· · . .'.' .. ...':~}.~~
.':..<:1 ...... ~~:.?.0. ~.~~·~········ ····· ....········ ..... ········ ·····.... ····· ·······.
'.J .
~;
....... ........ ................. ......... .............. ....................
·········· ········ .......................... .. ....... ........................
.............. ...
.............q.~.~.~. ~ .. ~ .. ~. :.t!.~f~ A.... ~~.~~.~.~~.~ ..... 0.P..~!.?. .....................................
!.... .
XI [I. Exercise:
t.
I. Con-cct the following scri pt and write its outpu
ble - skipping."; fi
J. if [ ! -r "$ I'' ] then echo "File $ I is not reada
i.S 00\- ~c,d ahle
2. if [ "$X" -nt "/ctc /passwd" ]; Then [ Pie
echo "X is a file which is newer than /ctc/passwd"
if [ L''°'f"P"<. H'~ e""d
(Space for Answer)
.............. ..................
.... J.:...................... ............................. .............................. ........ ............... .......
... } ........... .. ............. ............................ ................
........................................................................... .
t ~ fl : tea d 1 ················· ......... .
······· . ···········································;·i···c··~··~~··i·1·j······· .. ··~h·;·~·········· ···········--
~r 1 , , #
G.,_ $_; :-: .... -~-c-~~-~- __:_ ~-............ •• ••• •• •• •. • •. •. • •. .. .. • . . • . . . . .. .. .. . . • . .. . . • . • • • ••• .. .. •• •• ••• .. •.. ••. . • . • • •. • • .. ••• •. . . •• . • . •••.••.•.•••
I<·,, l
......... ................ -................. ·l-. ·- ..............
V
I ................................................................... ...... . ............... .
................ .............. .. .... ~-~-...tJ.. -~ .. :-..0. .+..'.'.. !~ -~-~-.(.. r.~~-~ -~.~!.. :~. J. ...... ~! -~~:.: .......................... .
. .. . .. . . . . . .. . . . . . . . .. . . . . . . . .. . . . . .echo . . ..V. . . . .is
. . . . . . . . ......,.. . ..$ . . .. . . . . . . . .wh;ch
.. ... . +1'le .s ...n~wE-t..
. ... .. . . . . . . . ..,.... . .. ... . . . . ./(;,i
. . .... . . .. .. . ..-Hv:.n . . . . . . .r. . .I~: ..
. . - :.~-~~~ ,.