Question Paper: Unix and Shell Programming Question Paper - May 2016 - Computer Science (Semester 4) - Visveswaraya Technological University (VTU)

Unix and Shell Programming - May 2016

VTU Computer Science (Semester 4)

Total marks: --
Total time: --
(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 architecture of UNIX operating system. 6 marks

1(b) With the help of examples, explain the following commands:
i) Apropos ii) whatis
6 marks

1(c) Explain the follwing with suitable examples:
i) absolute and relative pathnames
ii) internal and external commands.
6 marks

2(a) Files current permissions are rw - - w - - - write chmod expressions required to change then for the following:
i) r - - r - - - - x
ii) r w x r w x - - x
iii)r - x r - x r - x
iv) r w x r w x r - -
Using both relative and absolute methods of assigning permissions.
6 marks

2(b) What are different modes of vi editor? Explain with a neat diagram. 6 marks

2(c) Write UNIX commands for the following:
i) Find and replace all the occurrences of unix with UNIX in the text file after confirming the user (vi editor command)
ii) List all the files in PWD which are having exactly five characters in their filename and any number of characters in their extension
iii) To copy all files stored in /home/vtu with .c, .cpp and .java extensions to progs directory in current directory.
iv) To delete all files containing * in their file name
v) To delete all files with three character extension except .out from current directory
vi) To display (list) contents of current directory and its subdirectories.
6 marks

3(a) Explain 2 standard files supported by UNIX. Also give details about special files used for output redirection in UNIX. 6 marks

3(b) Explain mechanism of process creation. Also given details about process states and xombies. 6 marks

3(c) Explain following with examples:
i) cron ii) HOME iii) PATh iv) MAIL.
6 marks

4(a)(i) Differentiate between hard link and symbolic link 6 marks

4(a)(ii) Explain significance of permissions to directory. 6 marks

4(b) What does touch foo command mean? Why touch command is important is important for the system administrator? 6 marks

4(c) Explain the following with example :
i) head ii) tail iii) cut
6 marks

5(a) With the help of example grep command and list its options with their significance. 6 marks

5(b) Explain line addressing and context addressing in sed with example. 6 marks

5(c) Briefly explain interval regular expression and tagged regular expression. 6 marks

6(a) Explain shell features of while and for with syntax. 6 marks

6(b) What is exit status of a command and where it it stored? And how it can be accessed? Give examples. 6 marks

6(c) Write a shell code to accept a string from the terminal and display suitable message if it doesn't have at least 10 characters using: i) case ii) expr. 6 marks

7(a) What is AWK? Explain any three built in functions of AWK. 6 marks

7(b) What are associative arrays? How they are implemented in AWK? 6 marks

7(c) With syntax and examples, explain control flow statements in AWK. 6 marks

8(a) Explain any three string handling functions in Perl 6 marks

8(b) With suitable examples explain split and join functions in Perl. 6 marks

8(c) Write a Perl program that prompts the user to input string and a number and prints the string those many times on different lines to standard output. 6 marks

written 10 months ago by gravatar for vatsalmehta922 vatsalmehta9220
Please log in to add an answer.