VTU Computer Science (Semester 4)
Unix and Shell Programming
June 2012
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) With neat diagram, explain the architecture of UNIX operating system.
6 M
1 (b) With the help of a diagram the parent-child relationship. Explain the UNIX file system.
6 M
1 (c) Explain the following with examples:
i) Absolute and relative path names
ii) Internal and external commands.
8 M

2 (a) A file's current permission are rw_r_xr. Specify the chmod expression required to change them for the following:
i) rwx rwx rwx
ii) r_ _ r_ _ _ _ _
iii) _ _ _ _ _ _ _ _ _
iv) _ _ _ r_ _ r_ _
using both relatives and absolute methods of assigning permissions.
8 M
2 (b) Explain briefly the file attributes listed using ls -l command.
6 M
2 (c) What are the different modes of Vi editor? Explain with a diagram.
6 M

3 (a) Explain the three standard files with respect to UNIX operating systems.
6 M
3 (b) Explain the mechanism of process creation.
6 M
3 (c) Explain the following command with an example:
i) Running jobs in background
ii) Execute later.
8 M

4 (a) Explain the following environment variables with examples:
i) SHELL
ii) LOGNAME
iii) PATH
6 M
4 (b) Different between hard link and soft link in UNIX with examples.
6 M
4 (c) Explain the following command with example:
i) tail
ii) paste
iii) tr
iv) pr
8 M

5 (a) With suitable example, explain the grep command and its various options.
8 M
5 (b) Explain the line addressing and context addressing in sed with examples.
6 M
5 (c) Explain the different ways of using test statements, with examples.
6 M

6 (a) What is shell programming? Write a shell program that will do the following tasks in order:
Clear the screen
Print the current directory
Display current login users.
8 M
6 (b) Explain the shell features of 'while' and 'for' with syntax.
8 M
6 (c) What is the 'exit' status of command and where is it stores?
4 M

7 (a) What is AWK? Explain any three built in functions in AWK.
7 M
7 (b) Write an AWK sequence to find HRA, DA and Netpay of an employee, where DA is 25% of basic and netpay is the sum of HRA, DA and basic pay.
7 M
7 (c) Explain the list and arrays in PERL.
6 M

8 (a) Explain the following storing handling functions of PERL with examples:
i) length ii) index iii) substr iv) reverse
8 M
8 (b) Write a PERL program to print numbers that are accepted from keyboard using while and array construct.
6 M
8 (c) Explain the following in PERL with examples.
i) force each loping construct ii) join
6 M



More question papers from Unix and Shell Programming
SPONSORED ADVERTISEMENTS