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

Unix June 2012

This document appears to be exam questions from a Unix and Shell Programming course. It covers several topics related to Unix operating systems including architecture, file systems, permissions, commands like grep, sed, awk, and perl. The questions test knowledge of concepts such as paths, file attributes, process creation, environment variables, hard and soft links, and shell programming features including while and for loops. It also includes questions on awk functions and using awk to calculate employee pay, as well as perl arrays, functions, and a program to accept input.

Uploaded by

Mohnish Raju
Copyright
© Attribution Non-Commercial (BY-NC)
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)
60 views2 pages

Unix June 2012

This document appears to be exam questions from a Unix and Shell Programming course. It covers several topics related to Unix operating systems including architecture, file systems, permissions, commands like grep, sed, awk, and perl. The questions test knowledge of concepts such as paths, file attributes, process creation, environment variables, hard and soft links, and shell programming features including while and for loops. It also includes questions on awk functions and using awk to calculate employee pay, as well as perl arrays, functions, and a program to accept input.

Uploaded by

Mohnish Raju
Copyright
© Attribution Non-Commercial (BY-NC)
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

vtuplanet.

com
USN
(

14

v(

l0cs44

Fourth Semester B.E. Degree Examination, June 2Ol2

Unix and Shell Programming


Time: 3 hrs.
Note: Answer FIVE full questions, selecting at least TWO questions front each part.
dJ

Max. Marks:100

rsu'
Llb'

PA,RT - A With neat diagram, explain the architecture of unix operating

system.

(06 Marks)

o.

With the help of a diagram, explain the parent-child relationship. Explain the unix file

system.

(06 Marks)

*5c' Explain the following with examples:


i) Absolute and relative path

o qa

names ii) Internal and external commands.

(08 Marks)

2a. .L
s
n0"
,,'

A file's current permissions are rw _ r_ x r__. Specify the chmod expression required to
change them for the following:

cca
.= 6l

i)

rwx rwx

rwx

iiD

Yo oi o>
aX oO

using both the relative and absolute methods of assigning permissions.

__

ii) r _ iv)___ r__ r__


(08 Marks) (06 Marks) (06 Marks) (06 Marks) (06 Marks)

lb.
L, c'

Explain briefly the file attributes listed using ls -

command.

tE

What are the different modes of Vieditor? Explain with a diagram. Explain the three standard files with respect to unix operating systems. Explain the mechanism of process creation. Explain the following commands with an example: i) Running jobs irr background ii) Execute later. Explain the following environment variables with examples:
D

3a.
b. c.

b0tr

-a 3! =9
o(!

(08 Marks)

4a. .L
-b. 5
U.

SHELL

ii)

LOGNAME

iii) PATH

(06 Marks)
L/

Differentiate between hard link and soft link in unix with examples.
Explain the following commands with example: i) tail ii) paste iii)

(06 Marks)

oi o:6
,o cH
!o

tr

iv) pr

(08 Marks)

>.1 ootr ot)


o=
ga)

tr>
(_)

5l u. Tb
1-c.

PATTT _ B With suitable examples, explain the grep command and its various options. Explain the line addressing and context addressing in sed with examples. Explain the ditlbrent ways of using tesi statements, with examples.

(08 Marks) (06 Marks) (06 Marks.l

-;^
<

-i 6i o

6 a.

z
o.

What is shell programming? Write a shellprogram that willdo the following tasks in order: Clear the screen Print the current directory (08 Marks) Display current login users.
Explain the shell features of 'while' ancl 'for' with syntax.
(08 Marks) (04 Marks)

jb.
,)c.

What is the 'exit' status of a command and where is it stores?

I of

10cs44

a. b.

What is AWK? Explain any three built in functions in

AWK.

(07 Marks)
(07 Marks)

Write an AWK sequence to find HRA, DA and Netpay of an employee, where DA is 25Yo of
basic, HRA is 50% basic and netpay is the sum of HRA, DA and basic pay.

c. 8 a. b.
c.

Explain the list and arrays in PERL.

(06 Marks)

Explain the following storing handling llnctions ii) index iii) i) lenglh
array construct.

substr

of

PERL with examples:

iv) reverse

(08 Marks)

Write a PERL program to print numbers that are accepted from keyboard using while and
(06 Marks)

Explain the following in PERL with examples. i) fore each loping construct ii) join

(06 Marks)

{<****

vtuplanet.com

af2

You might also like