JNTU Exam Papers-B.Tech-Unix And Shell Programming-November 2008

JNTU B.Tech I Semester Regular Examinations, November 2008

UNIX AND SHELL PROGRAMMING

( Common to Computer Science & Engineering and Information

Technology)

SET-2

 

1. (a) Describe interrupt and EOF characters.

(b) What do multiuser and multitasking mean.

 

2. (a) Show the octal representation of these permissions:

i. rwx ? ?x ? w?

ii. ? ? ? ? ? ? ? ? ?

iii. ? ? xr ? ? ? ?x

iv. ? ? ?rwx ? ??

(b) Explain about file security in unix.

 

3. What will be the effect of following UNIX commands(assume that a file s.c contains

100 lines).

(a) tail < s.c |tee y |sort < y |uniq <y |nl y |ln y z |rm y |catz

(b) Discuss about alias command and its usage.

 

4. (a) How do locate lines beginning and ending with a dot using:

i. grep

ii. sed.

(b) What is the difference between a wild cards and a regular expressions in sed?

 

5. (a) Write a script that changes the name of files passed as arguments to lowercase.

(b) Write a script that, given a filename as the argument, deletes all even lines

(lines 2,4,6? ? ?n) in the files.

 

6. (a) Find the line that matches a regular expression in korn & grep.

(b) Find the line that does not match a regular expression in korn & grep.

 

7. (a) Explain the storage of values in variables.

(b) Explain null values in interactive C shell.

 

8. Explain the following System calls for File Management:

(a) create

(b) lseek

(c) stat

(d) closedir.

Leave a Comment