0% found this document useful (0 votes)
26 views3 pages

Practical 9 OSY

Osy

Uploaded by

vishalpawar7287
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views3 pages

Practical 9 OSY

Osy

Uploaded by

vishalpawar7287
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Operating System (22516)

X.
Program Code: Teacher must assign a separate
Create a file OS and type at program statement to students.
i) Write command to save the least 30 lines in it.
ii) Write the command to file
insert text at the end of line.
ii) Replace some character into
iv) Write a beginning of second line.
command to delete 10 lines at a
V) Write a command to move cursor 3 wordtime.
to the right
XI. Result (0utput of Code):

XII. Practical Related Questions


Note: Below given are few sample qçestions for reference. Teacher must design
more swch questions so as to ensure the achievement of identified CO.
1. What is the difference between Type o and Type 0?
2. State the three ways quit the vi-editor.
,it 3. What is effect of (Type this àt colon mode and observethe changes ia your file)
a. _et nu
b: set ic
C. Set nonu.
d. set noai

4. Give vi command to delete line to the left of cursor.


5. What is difference between yank and delete?
6. What are different modes in Vi editor?
7.Observe the output of foilowing commands:
1) at colon mode
Labbr MSBTE ! Maharashtra State Board Of Technical Education
Now in the beginning of your file type MSBTE and press space bar
Write down the output

ii) Go to beginning of your file press 4YY


Then move to end of your file and press p l
Write the purpose of the command

(Spaçe for answer)

CreadeS a new0 line for text Creates a newS line for text
entry beloco etrsor lo cation. erhg above curSOr locatio0
command = 0
Maharsbtro tate Board or Techoical Eiucution
Operating System (22516)

T you are currenHu in iosert ar append mode- press


£SC.
press : ((colon). The cursOr shocdd reappear o +he.
lo uer lePt corner of the sCreen besides a colon prompt.:.
q Enter the foll00ing :9!.

)Use backspace to delete to theleft of the cursor. if god.


need to more tthe crsor to anoher line or make a change
or preey much angtbiog el se y0u need to be press Esc
to 9et back to the command mode first.
Young Delete
CoPy is caed yakCy) i) cut is caLled delete cd
i) comm and d

) Three modes OP operation in vi are insert mode, command


Mode. YOu dse insert mode to ype text into q file,
while command mode is dsed to type commands that ...

perPorm sp ecific vi fupcion. coMmand mode is defaut


mode for u'.
a Command mode in this. mode, you ca open or create
files ,specify cursor position ¢ editing cómmand, save
or qute yor worit ?, ........*.....
**...... press ESC Keyto eturnto command
mode.
6] Tnsert mode Tn tbis mnode, yod can erter ext
into the display on gor screen. To edit the file, to
enter the entry. mode, you need.to specify an inptommand
first.
The înput comm cLnds qe: T for insert,
o for overwnie
a for append

Maharashtra state Board of Technical Education 60


Operating System (22516)

XIII. Exercise:
1. Write the significance of following.
S vi temp.txt
ii. Insert multiple lines.
ii. Delete contents using commands.
2 Create a new file and practice executing shell commands from within the editor.
Capture the results of some shell commands into the file.
3. How to get help?
(Space for Answer)

) 1svitenmptt
- Vi auill create the file emptt " for y0u. Save the file
tbatt gOu are in.Create a file usipg vi editor and ediiog
in Tnsert multiple lines :
In visUal blak mode you can pass. T to insert ext at
.......*.
the same position in mutiple lines and gou .......
cn press A
to append text to each lines in block. As auel as insering
or appending tex+ that gou ty. pe, you carn insert gr
appepd tex+ from register.
Por example,
the clipboatd
ii Delee contents usinq comm and.
line.we
Tt is important commaDd. Which can be to delete
COUn delete mlHple Iines at a tme using this command.

Script Pile_nm
Ex ecute commaDd
Run exit command
Cat filenm

open vi editor
6] Then cdick on help opho ps.

Maharashtra state Board of Technical Education 61

You might also like