JNTU II B.Tech I Semester Regular Examinations, November 2008
Unix And Shell Programming
( Common to Computer Science & Engineering and Information
1. What would be the effect of the following commands:
(a) cat users
(b) echo $PS1
(c) mv x.c y
(d) uname -r
(e) rm x.c
(h) mkdir xyz.
2. What information is presented when the following commands are entered:
(f) nl x.c
(g) tee x.sh
(h) tr ‘*’ ‘s’ x.dat |tee x.dat .
3. Differentiate background process and foreground process with suitable examples.
4. How grep works? Explain with any eight examples.
5. Explain the following decision making procedures using awk shell scripts with examples:
(a) If then else
(b) Nested if
(c) Case statements.
6. (a) Explain the pattern/action syntax.
(b) Explain the basic decision statement if-else with suitable example.
7. (a) What are the advantages of file expression? Discuss file operators with suitable
(b) Which expression uses a set of three logical operators? Explain it with example.
8. (a) Write the syntax for the following system calls:
(b) Explain any two API Directories.