Unix and Shell Programming QP
Unix and Shell Programming QP
1
IV B.Tech II Semester Supplementary Examinations, July/August - 2017
UNIX AND SHELL PROGRAMMING
(Electrical and Electronics Engineering)
4 a) Define the ‘grep’ family. Mention the primary difference between fgrep and
the other two members of the grep family. [7]
b) Write a ‘sed’ command to
i) display the lines through 10 to 15 in a given text file
ii) replace the word ‘UNIX’ with ‘LINUX’ in a given text file [8]
8 a) Explain the commands that are available in UNIX file system to change the
permissions of a file. [7]
b) Explain the following directory API with example
(i) opendir (ii) readdir (iii) closedir [8]
1 of 1
|''|'''||''||'''||||
Set No. 1
Code No: R42029 R10
IV B.Tech II Semester Regular/Supplementary Examinations, April/May - 2016
UNIX AND SHELL PROGRAMMING
(Electrical and Electronics Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
*****
1 a) What is kernel? Is it similar to the operating system? Explain. [4]
b) Explain the features of Unix. [4]
c) Explain the commands cp, rm and cat with examples. [7]
1 of 1
|''|'''||''||'''||||
Set No. 2
Code No: R42029 R10
IV B.Tech II Semester Regular/Supplementary Examinations, April/May - 2016
UNIX AND SHELL PROGRAMMING
(Electrical and Electronics Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
*****
1 a) Explain about the architecture of the Unix. [7]
b) Explain the commands uname, mkdir, more and wc with examples. [8]
2 a) What is the importance of tr and cpio commands? Explain with examples. [8]
b) Discuss about any four text processing utilities with examples. [7]
4 a) What are different commands are there in grep family? Explain the importance
of each and also explain various options of it with examples. [8]
b) Write a shell script to print the lines which are not containing the “unix” word. [7]
1 of 1
|''|'''||''||'''||||
Set No. 3
Code No: R42029 R10
IV B.Tech II Semester Regular/Supplementary Examinations, April/May - 2016
UNIX AND SHELL PROGRAMMING
(Electrical and Electronics Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
*****
1 a) Is cp is similar to mv? Explain with examples [3]
b) Explain the commands tar, pwd, more and script with examples. [7]
c) Write a shell program to copy one file contents into another file without using
cp command. [5]
2 a) How many modes are there for vi editor? Explain the keys used in each mode. [8]
b) Explain about the grep family with examples. [7]
3 a) Which command is used to find the no of lines, characters and words in a file?
Explain with examples. [8]
b) Write a program to print command line arguments on the screen. [7]
5 a) Discuss about mathematical functions that can be used in awk command. [8]
b) What is the importance of patterns and action section in awk command?
Discuss. [7]
1 of 1
|''|'''||''||'''||||
Set No. 4
Code No: R42029 R10
IV B.Tech II Semester Regular/Supplementary Examinations, April/May - 2016
UNIX AND SHELL PROGRAMMING
(Electrical and Electronics Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
*****
1 a) Explain about the commands date, sty, rm and od. [8]
b) Write a shell program for display contents on screen without using cat
command. [7]
2 a) What are the permissions used for providing security for files? How to give
permissions for a file? Explain. [8]
b) Explain about different networking utilities. [7]
4 a) What is the need of the grep command? Discuss various options of the grep
and its importance with examples. [8]
b) Differentiate between sed and grep commands. [7]
5 a) Discuss about String functions that can be used in awk command. [8]
b) What are the applications of awk command? [7]
6 a) What is the importance of eval command? Explain with one program. [8]
b) Discuss about the environment variables. [7]
8 a) Which command is used to find the attributes of the file? Explain. [8]
b) Write a program to display all files in a directory. [7]
1 of 1
|''|'''||''||'''||||