0% found this document useful (0 votes)
20 views

16CS516-Unix & Shell Programming

This document contains a question bank for the subject "UNIX and Shell Programming" covering 5 units. It includes descriptive questions ranging from concepts about the UNIX structure and security, commands like date, who, passwd, vi editor, file types, permissions, ownership. Questions also cover shell programming concepts - variables, redirection, jobs, string manipulation commands, remote access, file transfer, text editing in vi, sed commands, Korn and C shell features, decision making, repetition, variables and expressions.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

16CS516-Unix & Shell Programming

This document contains a question bank for the subject "UNIX and Shell Programming" covering 5 units. It includes descriptive questions ranging from concepts about the UNIX structure and security, commands like date, who, passwd, vi editor, file types, permissions, ownership. Questions also cover shell programming concepts - variables, redirection, jobs, string manipulation commands, remote access, file transfer, text editing in vi, sed commands, Korn and C shell features, decision making, repetition, variables and expressions.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

QUESTION BANK 2019

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR


(Autonomous)
Siddharth Nagar, Narayanavanam Road – 517583

QUESTION BANK (DESCRIPTIVE)

Subject with Code : UNIX AND SHELL PROGRAMMING (16CS516) Course & Branch: B.Tech - CSE
Year & Sem: III-B.Tech & I-Sem Regulation: R16

UNIT –I
1. (a) Describe in detail about the structure of UNIX. 5M
(b) How can you say that Unix operating system provides more security than other operating
systems? 5M
2. What information is presented when the following commands are entered? 5*2=10M
(a) date (b) who (c) passwd (d) bc (e) script
3. (a) Define vi Editor and explain its modes. 5M
(b) Brief about the commands used in the vi Editor. 5M
4. What are the file types available in Unix? Discuss file operators with suitable examples. 10M
5. (a) Explain the security levels provided in Unix environment. How to change permissions of a file?
6M
(b) Brief umask command. 4M
6. What is user and group in Unix? Explain the related commands for changing ownership and group.
10M
7. Write about the operations unique to directories alone. 10M
8. Write about the operations that can be performed on both directories and file. 10M
9. What is meant by path and pathname in Unix? Explain them in detail. 10M
10. a) Distinguish between time – sharing and client/server environment. 2M
b) Name the two categories of regular files. Does UNIX recognize the difference between these two
categories? Explain your answer. 2M
c) Write syntax for changing ownership and group name on a given file/s 2M
d) Discuss about various modes of vi editor. 2M
e) Write the command for the following 2M
i. To display time in GMT
ii. To display time in format hour: minute: second

UNIX AND SHELL PROGRAMMING (16CS516) Page 1


QUESTION BANK 2019

UNIT 2

1. Explain Variables with its characteristics and options. 10M


2. What is redirection? Explain it in detail. 10M
3. (a) How quotes are used in Unix, explain with example. 5M
(b) Brief about command line editing. 5M
4. Explain in detail foreground and background jobs. Give example. 10M
5. (a) Explain concatenate command with its options. 5M
(b) Explain sort command with its options. 5M
6. What command is used for translating characters? Also explain its options with examples.
10M
7. How files with duplicate lines are handled in UNIX. 10M
8. What information is presented when the following commands are entered? 5*2=10M
(a) cmp (b) diff (c) comm (d) cut (e) paste
9. Write a shell program for counting characters, words and line? 10M
10. Explain (a) Aliases (b) Unix session 5+5=10M
10. a) Define pipes. 2M
b) Explain tee commands.
c) Compare and contrast the cmp command with the comm Command 2M
d) If your login shell is korn shell, can you create another korn shell as the child shell? What file
descriptor designates the standard input stream, standard output stream and the standard error
stream? 2M
e) List out ‘here’ document and append redirection operators with example. 2M

UNIX AND SHELL PROGRAMMING (16CS516) Page 2


QUESTION BANK 2019

UNIT 3

1. Explain talk and write command. 10M


2. What is mail? Explain it in detail. 10M
3. List all the commands associated with send mail with its actions performed. 10M
4. How remote access is done in Unix, detail it.. 10M
5. How files are transferred from client to server and vice versa. 10M
6. What will happen when the following command is typed inside the VI Editor? Give example.
(a) I (b) A (c) ~ (d) p (e) J 5*2=10M
7. List the range command in the VI Editor and explanation. 10M
8. How text manipulation is done in VI? Explain. 10M
9. Explain (a) Atoms (b) Operators 5+5=10M
10. What would be the effect of the following commands: 5*2=10M
(a) grep“^ [A - Z]” file1
(b) egrep “UNIX|Unix|unix” file1
(c) grep “UNIX$” file1
(d) grep “UNIX. UNIX” file1
(e) grep “.*” file1 > file2

11. a) Differentiate telnet and ftp command. 2M


b) What is meant by fast grep and extended grep. 2M
c) What is a dot? 2M
d) How do an undo command work in VI editor? 2M
e) Use awk command and check its exit status. When is the result zero? When is the result
nonzero? Check both cases. 2M

UNIX AND SHELL PROGRAMMING (16CS516) Page 3


QUESTION BANK 2019

UNIT 4

1. Explain the following commands related to sed. 6+3+3=10M


(a) modify commands (b) substitute commands (c) hold space commands
2. List Korn shell features. 10M
3. (a) How input is read in Korn shell. 5+5=10M
(b) What is eval command?
4. What do the following options? 5*2=10M
(a) emacs (b) noglob (c) verbose (d) xtrace (e) ignoreeof
5. (a) what does a startup script consist of. 5M
(b) Explain the basic script concepts orientes with Korn shell. 5M
6. How decision making is done? Explain with a program. 10M
7. Explain repetition. 10M
8. (a) How argument validation is done? 5M
(b) How shift command work? 5M
9. List and explain the expressions involved in Korn shell. 10M
10. Explain (a) special parameters (b) special variables 5+5=10M
11. a) Distinguish between a script file and an input file. 2M
b) What does the following options work with modify command. i,a,c,d 2M
c) Distinguish between the three standard streams. 2M
d) List the relational patterns supported by Korn shell. 2M
e) What is meant by child shell execution? 2M

UNIX AND SHELL PROGRAMMING (16CS516) Page 4


QUESTION BANK 2019

UNIT 5

1. List and explain string functions. 10M


2. Explain (a) special parameters (b) command history 5+5=10M
3. List the C shell features. 10M
4. Explain how the following are handled
(a) Environmental variables (b) on-off variable 5+5=10M
5. Detail about the variables associated with C shell. 10M
6. How decision making is done? Explain with program. 10M
7. Explain repetition. 10M
8. (a) How argument validation is done in csh? 5M
(b) How debugging scripts work in csh? 5M
9. List and explain the expressions involved in C shell. 10M
10. a) How arrays are processed using awk? 2M
b) Define trash file. 2M
c) Explain eval command. 2M
d) List and explain file status operators. 2M
e) Write about @ command. 2M

UNIX AND SHELL PROGRAMMING (16CS516) Page 5

You might also like