JNTU B.Tech I Semester Regular Examinations, November 2008
UNIX AND SHELL PROGRAMMING
( Common to Computer Science & Engineering and Information
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
(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:
(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: