You are on page 1of 5

Code No: R42029 R10 Set No.

1
IV B.Tech II Semester Supplementary Examinations, July/August - 2017
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) With a neat sketch, explain the architecture of UNIX operating system. [7]
b) Explain the following UNIX commands
(i) uname (ii) ls (iii) more (iv) cat [8]

2 a) Explain the implementation details of UNIX file system. [6]


b) Explain the following UNIX commands
(i) grep (ii) sort (iii) diff [9]

3 a) What is Redirection? Explain various commands used for redirection. [7]


b) What is a filter in UNIX? List out various filters in UNIX. Explain any two of
them. [8]

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]

5 a) Define an associative array and explain the steps in processing an associative


array. [8]
b) With a neat diagram, describe an awk utility’s view of a file and also explain
the file buffers and record buffers of awk. [7]

6 a) What is an Environment variable? List out the environment variables that


control the user environment in Korn Shell. [8]
b) Demonstrate the execution of Loop redirection with a suitable example. [7]

7 a) Explain the echo command in C shell. Demonstrate the use of C shell


character codes for each command. [8]
b) What is the application of ‘eval’ command in C shell and also explain the
execution of ‘eval’ command with suitable example. [7]

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]

2 a) Differentiate between head and tail. [3]


b) Explain about process utilities. [4]
c) Write a shell script for the following
i) for display only the lines which are containing the word “unix”.
ii) For display only duplicate lines in a file.
iii) For display only 3 and 6 fields in a file.
iv) For display particular user files only. [8]

3 a) What is filter and pipes? Explain with example. [4]


b) Write a shell script to count no of lines for a given file without using wc
commands. [7]
c) Discuss about the sort command with examples. [4]

4 a) Explain about the various operations of sed commands. [8]


b) Write a shell script checking whether “rama” was logged in or not. [7]

5 a) Differentiate between sed and awk. [8]


b) What is meant by associate arrays? Discuss. [7]

6 a) How to find the exit status of a command? Discuss. [8]


b) Write a shell script for performing the arithmetic operations. [7]

7 a) Explain about the features of C shell. [8]


b) Write a shell script to print the reverse sting on the screen. [7]

8 a) Explain any four operations that can be performed on a file. [8]


b) Write a program to print file contents in reverse order. [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]

3 a) Differentiate between cat and tee commands. [5]


b) Explain about the redirection operators with examples. [7]
c) What is command substitution? Give examples. [3]

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]

5 a) Differentiate between grep and awk. [8]


b) Explain various commands in awk with examples. [7]

6 a) Explain about the features of Korn shell. [8]


b) Write a shell script for finding the GCD between the given numbers. [7]

7 a) Explain about the looping statements in c shell. [8]


b) Write a shell script to find whether the given no is strong no or not. [7]

8 a) What is file? What are different types of files? Explain. [8]


b) Write a program to display file contents on the screen. [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]

4 a) Discuss about the addresses in sed command. [8]


b) What are the applications of sed command? Explain. [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]

6 a) How arguments validation is done? Discuss. [8]


b) Write a shell script for printing the ncr value. [7]

7 a) How commands are executed in C shell? Discuss. [5]


b) Write a shell script to find whether the given no is Armstrong or not. [10]

8 a) Explain any four operations that can be performed on a directory. [8]


b) Write a program to display only directories in a directory. [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]

3 a) Discuss about the types of the variables with examples. [8]


b) Write a shell script to concatenate two files. [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]

7 a) Explain about the special parameters in C shell. [8]


b) Write a shell script to find whether the given string is palindrome or not. [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

|''|'''||''||'''||||

You might also like