Unix and Shell Programming - Jun 2013
Computer Science Engg. (Semester 4)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS (1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks. 1 (a) With a neat diagram, explain the architecture of UNIX operating system.(8 marks) 1 (b) With the help of a neat diagram, explain the parent-child relationship. Explain UNIX file system.(6 marks) 1 (c) Explain briefly absolute pathname and relative pathname with examples.(6 marks) 2 (a) Give the significance of the seven fields of the "ls -l" command.(7 marks) 2 (b) What is file permission? Explain how to use "Chmod" command to set the permissions in a relative manner with an example.(7 marks) 2 (c) Explain the three different modes in which "Vi" editor works.(6 marks) 3 (a) Explain the standard input, standard output and standard error with respects to UNIX operating system.(7 marks) 3 (b) Explain the mechanism of process creation.(7 marks) 3 (c) What are environment variables? Explain any four.(6 marks) 4 (a) Different between hard link and soft link in UNIX with examples.(6 marks) 4 (b) Explain "sort" command briefly. Also discuss its important options with examples (any five).(6 marks) 4 (c) Explain the following commands with example:
i) head ii) tr iii) uniq iv) find(8 marks) 5 (a) Explain 'grep' command with its options.(8 marks) 5 (b) Explain line addressing and context addressing in "sed" with examples.(6 marks) 5 (c) What are extended regular expression (ERE)? Explain any four ERE set used by "grep" and "egrep".(6 marks) 6 (a) Explain the use of "test" and  to evaluate an expression in shell.(6 marks) 6 (b) Explain the shell features of 'while' and 'for' with syntax.(6 marks) 6 (c) Explain the "expr" command applicable to computation and string functions.(8 marks) 7 (a) What is AWK? Explain any three built in functions in AWK.(7 marks) 7 (b) Write short notes on operators and expressions in AWK.(6 marks) 7 (c) Explain built-in variables in AWK.(7 marks) 8 (a) List the string handling functions in PERL. Write a program to find number of characters. Word as well as to print reverse of a given string.(8 marks) 8 (b) Explain "chop()" and "split()" functions with examples.(6 marks) 8 (c) Explain file handling in PERL.(6 marks)