JNTU II Regular Examinations -Unix And Shell Programming- November 2008
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?
(b) mkdir xyz
(c) ls -la
(d) mv myfile1 myfile2
(e) rm myfile
(f) wc myfile
2. (a) What will be the effect of following UNIX commands?
iii. ulimit 1024
(b) Discuss telnet and rlogin.
3. (a) What would be the effect of the following commands:
i. fg ss + ctlz
ii. bg tt + ctlc
iii. alias c = clear
iv. tee x.dat.
(b) Write a shell script to lock your terminal till you enter a password.
4. (a) How do you replace “/some/UNIX/path” in a substitution?
(b) How do you delete only the first occurrence of a pattern?
5. (a) What are the different types of operators used in awk shell script? Explain.
(b) Mention different types of loop statements in awk shell script.
6. (a) Explain the substitution string function format with an example.
(b) Explain the global substitution string function format with an example.
(c) What is the use of toupper & tolower functions, explain them with the suitable
7. (a) Describe the relational expressions of C shell program.
(b) Distinguish between user defined variable and predefined variable.
8. Write the syntax for the following and explain with an example:
(a) Making directories
(b) Removing directory
(c) Coping files
(d) Deleting file