0
1.2kviews
Unix And Shell Programming Question Paper - Jun 16 - Computer Science (Semester 4) - Visveswaraya Technological University (VTU)
1 Answer
0
9views

Unix And Shell Programming - Jun 16

Computer Science (Semester 4)

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 architecture of UNIX operating system. (06 marks)

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

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


2(a) Files current permissions are rw - - w - r - - write chmod expressions required to chnage them 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.
(08 marks)

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

2(c) Write the UNIX commands for the following:
i) Find and replace all the occurences 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 charecters in their filename and any number of charecters 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 charecter extension except .out from current directory
vi) To display (list) contents of current directory and its subdirectories.
(06 marks)


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

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

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


4(a) i) Differentiate between hard link and symbolic link
       ii) Explain significance of permissions to directory.
(08 marks)

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

4(c) Explain the following with examples:
i) head      ii) tail      iii) cut.
(06 marks)


PART - B
5(a) With the help of example explain grep command and list its options with their significance. (08 marks)

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

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

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

6(b) What is exit status of a command and where is it stored? And how it can be accessed? Give examples. (06 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. (06 marks)

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

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

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

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

8(b) With suitable examples explain split and join functions in Perl. (06 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. (08 marks)

Please log in to add an answer.