0% found this document useful (0 votes)
27 views2 pages

VTU - B.E B.Tech - 2019 - 3rd Semester - July - CBCS 17 Scheme - CSE - 17CS35 UNIX and Shell Programming

Uploaded by

Nids Chakravarty
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)
27 views2 pages

VTU - B.E B.Tech - 2019 - 3rd Semester - July - CBCS 17 Scheme - CSE - 17CS35 UNIX and Shell Programming

Uploaded by

Nids Chakravarty
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/ 2

www.FirstRanker.com www.FirstRanker.

com

17CS35

Third Semester B.E. Degree Examination, June/July 2019
UNIX and Shell Programming

Time: 3 hrs. Max. Marks: 100


Note: Answer any FIVE full questions, choosing
ONE full question from each module.

Module-1
--..- 1 a. With a neat diagram, explain the architecture of UNIX operating system. (08 Marks)
b. Differentiate between internal and external commands in UNIX with suitable examples.
-0 (05 Marks)
cizt c. Write down the key combinations for managing the non-uniform behavior of key board and
w3 terminal for the following :
u
to ,-_,-
u

0. - ' i) Backspacing doesn't work


... ---; ii) Killing a line
1 d•
iii) Interrupting a command
to
.0:iit.
.,-:: + iv) Terminating commands input
.- ,-.1
.v. ti) v) Keyboard is locked
3. v U vi) {Enter] key doesn't work
.0. ....
.2 vii) Terminal behaves in eratic manner (command). (07 Marks)
5
om

cu g2
.– o
_ ..... OR
r.c

,,,,,, 4F4
O-Cr 2 a. Explain the salient features of UNIX operating system. (08 Marks)
ke

L) a)
i., b. Differentiate between 'more' and 'less' page programs in UNIX. (04 Marks)
7-4 a
c. List and describe the mandatory and optional sections of man page in UNIX operating
an

C; -a
to
ct 0
...
-,i 8
C,3 system. (08 Marks)
tR

33
5'
irs

- a 71 Module-2
>,
.F

1. ....2
3 a. Illustrate with a neat diagram typical UNIX file system and explain different types of fi les
w

.-. 8
0.
O 0.a.
supported in UNIX.
w

(08 Marks)
w

g b. Assume you are in /home/Kumar, which of these commands will work when executed in
-e _2 sequence? Explain the proper reasons.
..?:-ti=.
gt_.' „,
'--: mkdir alb/c --> mkdir a a/b
=0 — -0 mkdir a a/b a/b/c -+ rmdir a/b/c --> rmdir a alb -> mkdir alp a/q a/p/r
• ,,-, Draw the final tree structure for directory 'a'. (07 Marks)
to 0
r..-. to
— ::: c. Explain the following commands with an example. i) cd ii) pwd iv) rmdir v) we. (05 Marks)
15 '471
a.2
E>
(:)
c.J OR
8-" .',--- 4 a. Which command is used for listing file attributes? Explain the significance of each field in
.._; rsi the output. (08 Marks)
Important Note

b. Explain the following commands with an example for each.


i) cp ii) rm iii) my iv) cat. (04 Marks)
- -
e_ Current file permissions of a regular file unix are rw_ _w_ _ _x. Write chmod expressions
required to change it to the following :
i) _wxrwxr_x ii) _ __r_xrw iii) rwx x iv) r wx .
Using both relative and absolute methods of assigning permissions. (08 Marks)
www.FirstRanker.com
1 of 2
www.FirstRanker.com www.FirstRanker.com

17CS35

Module-3
5 a. Explain the three modes of vi. Indicate clearly how can you switch form one mode to
another. Explain the following input mode commands : i 1, a A, r, R, o, 0, s, S. (10 Marks)
,

b. Explain what these wild-card pattern match


i) [A — Z]???? * ii) *[! 0 — 9]* iii) *.[!t][lx][q] (06 Marks)
c. Explain the navigation keys for the following types of navigations in vi editor.
i)Movement in four directions
ii) Word navigation. (04 Marks)

OR
6 a. With suitable examples, explain the `grep' command with its various options. (06 Marks)
b. Briefly explain Basic Regular Expression (BRE) and Extended Regular Expression (ERE)
metacharacters. (10 Marks)
c. Write a regular expression to match the following i) a decimal number which is non negative
and floating point number ii) A valid 'C' variable. (04 Marks)

Module 4 -

7 a. Explain the following commands with an example for each. i) head ii) tail iii) cut iv) paste.
(08 Marks)
b. What is shell programming? Write a shell program to create a simple calculator which can
perform basic arithmetic operations like addition, subtraction, multiplication or division,
om

depending upon the user input (10 Marks)


c. Write the syntax for if-else-fi statement in shell programming. (02 Marks)
r.c
ke

OR
an

8 a. Write a shell program to get the following details of the student. Name, age, USN and
tR

gender. Output all the details to the terminal. And also output whether the student is eligible
irs

to vote or not with suitable messages. (08 Marks)


b. Distinguish between hard links and soft links.
.F

(04 Marks)
c. Write and explain the syntax of 'while' and 'for' loops in shell programming.
w

(08 Marks)
w
w

Module 5 -

9 a. Write a Peri script to determine whether the given year is a leap year or not. (08 Marks)
h. What is the difference between a job and a process? How do you i) suspend the foreground
job ii) move a suspended job to the background iii) bring back a suspended job to the
foreground? (06 Marks)
c. Explain the mechanism of process creation. (06 Marks)

OR
10 a. Explain the following string handling functions of PERL with example :
i) length ii) index iii) substr iv) reverse. (08 Marks)
b. Explain the following commands :
i) at cron iii) nice iv) nohup. (08 Marks)
c. With suitable examples, explain 'split' and 'join' functions in PERL. (04 Marks)

**** *
of 2
2
www.FirstRanker.com CW.(00 1
.I.RRAR y

You might also like