Question Bank For Unix Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Question Bank for Unix Programming

Module1:
1. Discuss the architecture of UNIX operating system with the help of a neat diagram.
2. Write a note on the commands:
(i) passwd
(ii) cal
(iii) date
(iv) pwd
(v) expr
(vi) echo
(vii) bc
(viii) who
(ix) tty
(x) stty
(xi) uname
(xii) printf
(xiii) script
(xiv) spell and ispell
(xv) clear and tput
(xvi) cat
(xvii) touch
(xviii) sleep and wait
(xix) set and shift
3. Discuss features of UNIX.
4. Discuss positional parameters used by shell.
5. Explain the concept of exit status with suitable example.
6. Write a note on command line arguments with suitable example.
7. With an example, explain
a. for loop
b. while loop
c. unitl loop
d. case
8. Write a shell script that reads elements from command line and finds the sum of those
numbers.
9. Demonstrate logical operators with an example.
10. Discuss the concept of redirection in UNIX
11. What do you mean by here document? Explain with example.

Module2:
1. Explain UNIX file system with a neat diagram.
2. Write a note on the commands:
a. cd
b. mkdir
c. rmdir
3. What is the use of ls command? In detail, Explain the output of ls –l.
4. Mention the different categories of files that exist in UNIX. Discuss each one of them
briefly.
5. Differentiate absolute pathnames and relative pathnames.
6. What do you mean by dot (.) and dot dot (..). Discuss with suitable examples.
7. What is file permission? What are the different ways of setting file permission? Explain.
8. What are the differences between hark links and soft links? Explain.
OR
Explain the concept of soft links and hard links with suitable examples.
9. Explain the following commands: i)chown ii)find iii)umask iv)chgrp v)ln.
Module-3
1. Explain the following commands
pr, tr, head, tail, cut, paste, sort, uniq
2. Discuss grep command with options.
3. Explain with example basic regular expression and extended regular expression.
4. What is sed command? Explain the different ways of addressing sed.
5. Explain various options of sed command.
6. Explain any 6 basic regular expressions with examples.
7. Discuss filters using regular expressions
8. Explain special characters * and ? with respect to ERE.
9. Write a short note on substitution.
10. Write a short note on text editing commands.
11. Write a short not on context addressing.
12. What is egrep and fgrep?
13. Discuss the concepts of IRE and TRE.

Module-4
1. What is awk? Explain built-in variables used in awk.
2. Explain awk built-in functions with suitable examples.
3. Explain associative array in awk with an example.
4. Briefly explain about BEGIN and END in awk.
5. Write a short note on control flow statements in awk.
6. Briefly explain exporting the shell variables using an example.
7. Write about conditional parameter substitution.
8. Explain eval, exec statements
9. Write a shell script that accepts one or more filename as arguments and convert all of
them to uppercase, provided they exist in current directory.
10. Write an awk script to compute gross salary of an employee accordingly rules given
below. i) if basic salary is <10000 then HRA=15% of basic & DA=45%
ii) if basic salary is <10000 then HRA=20% of basic & DA=50%
11. Discuss the commands: sh, expr, print, printf

Module-5
1. Briefly explain the difference between internal commands and external commands in
UNIX.
2. Explain the mechanism of process creation.
3. Explain the different privileges of system administrator.
4. How can any user acquire the status of super user? Explain.
5. Explain the concept of startup and shutdown process.
6. Discuss the commands df and du.
7. Explain the concept of tar and cpio.
8. Write a short note on
i) aliases ii) command history
9. Explain the following environment variables
i) PATH ii) HOME
10. Explain the commands: nice, at, batch, time

You might also like