VTU Computer Science (Semester 4)
Unix and Shell Programming
June 2015
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) Explain be architecture of UNIX operating system with a neat diagram
8 M
1 (b) Illustrate with a diagram, the typical UNIX file and explain different types of files supported in UNIX
8 M
1 (c) Explain internal and external commands with example
4 M

2 (a) Which command is used for listing file attributes? Briefly describe the significance of each filed of the output
8 M
2 (b) A file's current permissions are rq-r-xr--, specify the chmod expression required to change them for the following: i) r w x r w x r w x
ii) r - - r - - - -
iii) - - - - - -
Using both the relative and absolute methods of assigning permissions
6 M
2 (c) What are the different modes of vt editor ? Explain with a diagram
6 M

3 (a) Explain the three standard files with respect to UNIX operating system
6 M
3 (b) Explain the mechanism of process creation using system calls in UNIX
6 M
3 (c) Explain the following environment variables with example :
i)SHELL
ii) LOGNAME
iii) PATH
iv) PS2
8 M

4 (a) Distinguish between hard links and soft links with suitable example
6 M
4 (b) Explain the following filter with options: i) pe
ii)sort
6 M
4 (c) Use find command to locate from your home firectory
i) All files with the extension-html
ii) All files having mode number 9076
iii)All directories having permission 666
iv) All files not accessed for more than a year
v) All but the C program files
vi) All files named a- out and all 'C' source files and remove them interactively
6 M

5 (a) Explain grep command with all options
8 M
5 (b) Briefly explain the different ways of addressing used in sed with example
6 M
5 (c) Explain BRE (Basic regular Expression ) character subset used for constructing regular expression
4 M
5 (d) Write the command for the following
i) Use sed to delete all blank lines from a file named sample
ii) Use sed to replace all occurrences of the word : 'UNIX' with 'LINUX' in a file named sample
2 M

6 (a) What is shell programming ? Write a menu-driven shell script to perform the following
i) List of users who are logged in
ii) List of files in the current directory
iii) Today's date
iv) Quit to UNIX
8 M
6 (b) Explain with an example 'while' and 'for' loop in shell programming
6 M
6 (c) Briefly explain set and shift commands in UNIX to manipulate positional parameters with example
6 M

7 (a) What is AWK? Explain any three built-in functions in WK
7 M
7 (b) Explain associative arrays in AWK
6 M
7 (c) Explain built- in variables in AWK
7 M

8 (a) Explain the string handling function supported by PERL and also write a PERL script to convert a given decimal number to binary equivalent
12 M
8 (b) Explain the following in PERL with example
i) split
ii) join
8 M



More question papers from Unix and Shell Programming
SPONSORED ADVERTISEMENTS