0% found this document useful (0 votes)
7 views10 pages

UNIX Shell Programming Guide

The document outlines a comprehensive curriculum for UNIX and Shell programming, divided into five units, each containing detailed topics and questions for evaluation. Key areas include UNIX architecture, command structures, file manipulation, shell scripting, and the features of various shells like Korn and C Shell. The document also includes practical programming tasks and questions to assess understanding of the concepts.

Uploaded by

rahulkesavan6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

UNIX Shell Programming Guide

The document outlines a comprehensive curriculum for UNIX and Shell programming, divided into five units, each containing detailed topics and questions for evaluation. Key areas include UNIX architecture, command structures, file manipulation, shell scripting, and the features of various shells like Korn and C Shell. The document also includes practical programming tasks and questions to assess understanding of the concepts.

Uploaded by

rahulkesavan6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIX & SHELL Programming

UNIT – I
10 Marks:
1. Explain the UNIX architecture with a neat diagram and describe the
function of each layer.
2. Discuss the important features that make UNIX a powerful operating
system.
3. Differentiate between internal and external commands with suitable
examples.
4. Describe the command structure of UNIX with examples of
command syntax and arguments.
5. Explain in detail the process of accessing UNIX and describe login
and logout procedures.
6. Demonstrate the use of date, cal, and passwd commands with
suitable examples.
7. Explain various directory listing commands and their options with
examples.
8. Discuss the steps involved in creating and editing a file in UNIX.
9. Explain how to display the contents of a file using different UNIX
commands Illustrate the commands used for counting lines, words,
and characters in a file.
10. Discuss the various file manipulation commands like copy, rename,
and delete with examples.
11. Explain UNIX directory structure and the use of directory related
commands.
12. Develop C Program which simulates the cat Command.
13. Discuss file permission types and the method of changing file
permissions using symbolic and numeric modes.
14. Explain how ownership and group of a file can be changed. Give
examples.
15. Explain how ownership and group of a file can be changed. Give
examples.
16. Describe the procedure and commands for mounting and
unmounting file systems.
17. Explain archive operations in UNIX using tar, gzip, and zip
commands.
18. Develop C Program which simulates the cp Command?

2 Marks:
1. What are the main components of the UNIX architecture?
2. Define kernel and shell in UNIX.
3. List any four important features of UNIX.
4. Differentiate between internal and external commands.
5. What is the use of the date command in UNIX?
6. Write the command to change the password in UNIX.
7. How do you list all files, including hidden ones, in a directory?
8. What is the command to display the current working directory?
9. Write the command to create a new file in UNIX.
10. What is the purpose of the cat command?
11. How can you count the number of words in a file?
12. Write the syntax to copy a file in UNIX.
13. What command is used to rename a file?
14. How can you remove a file in UNIX?
15. Write the command to create a directory and its parent
directories.
16. How do you change the current directory in UNIX?
17. What is the function of chmod command?
18. Write the commands to mount and unmount a file system.
UNIT – II
10 Marks:
1. Explain a UNIX session in detail with login, command execution, and
logout procedures.
2. Describe standard input, output, and error streams with suitable
examples.
3. Discuss input and output redirection in UNIX and explain their uses with
examples.
4. Explain the concept of pipes in UNIX. How are they useful in command
chaining?
5. Describe the use of the tee command and demonstrate its operation
with examples.
6. Explain how UNIX executes a command internally with the stages of
command interpretation.
7. What is command-line editing? Discuss different editing keys and
shortcuts in UNIX.
8. Explain the different types of quotes used in UNIX and their significance.
9. Describe command substitution with syntax and practical examples.
10. Explain job control in UNIX and describe the use of fg, bg, and jobs
commands.
11. Discuss aliases in UNIX with steps to create, list, and remove aliases.
12. Explain user-defined variables and predefined variables in the UNIX
shell.
13. Discuss in detail the shell environment and how it can be customized.
14. Write a shell scripts to Sort the N Numbers?
15. What are filters? Explain the importance of filters in UNIX command
processing.
16. Discuss the use of filters for concatenating files and displaying the
beginning and end of files (cat, head, tail).
17. Explain the working of the following filters: sort, tr, uniq, and wc with
examples.
18. Describe the process of ordering and filtering text files using UNIX
filters with suitable examples.

2 Marks:

1. What is a UNIX session?


2. Define standard input, output, and error streams in UNIX.
3. What is the use of redirection in UNIX?
4. Write the syntax of input and output redirection.
5. What is the function of the pipe (|) operator?
6. Explain the purpose of the tee command.
7. What is command execution in UNIX?
8. Define command-line editing.
9. What are the System Calls? Give Examples related to file
management System?
10. What is command substitution? Give an example.
11. Define job control in UNIX.
12. Explain the three standard streams in Linux with examples.?
13. What is an alias in UNIX?
14. How do you create and remove an alias?
15. What are shell variables?
16. Explain the Pipe and Tree Commands?
17. What is the purpose of the shell environment?
18. Define a filter and give two examples.
UNIT – III
10 Marks:
1. Explain the working of the grep command and describe its options
with examples.
2. Discuss the different variants of the grep family: grep, egrep, and
fgrep.
3. Describe the process of searching for specific text patterns in a file
using grep.
4. Explain the concept of regular expressions in grep and give
practical examples.
5. Explain the structure and operations of sed command with syntax
and examples.
6. Discuss sed scripts, addresses, and operations with suitable use
cases.
7. Explain various applications of sed such as substitution, deletion,
and text insertion.
8. Compare and contrast the working of grep and sed with examples.
9. Write a shell scripts to check given Number is palindrome or not?
10. Describe how awk handles fields and records. Illustrate with an
example.
11. Discuss the different operations supported by awk with
examples.
12. Explain the use of patterns and actions in awk programming with
syntax.
13. What are associative arrays in awk? Explain their usage with an
example.
14. Discuss the various string manipulation functions in awk with
examples.
15. Write a shell scripts to check given Number is prime Number or
not?
16. Write short notes on user-defined functions in awk with syntax
and examples.
17. Compare the functionality of awk and grep with suitable
examples.
18. Discuss the relationship and differences between sed and awk
commands with practical illustrations.

2 Marks :
1. What is the purpose of the grep command in UNIX?
2. List the different variants of the grep family.
3. Write the syntax of the grep command.
4. How is egrep different from grep?
5. What does the -i and -v option in grep do?
6. What is the use of fgrep command?
7. Write the command to search for a specific word in a file using
grep.
8. What is the function of the sed command?
9. Define a sed script and its purpose.
10. Explain the use of sort and uniq with examples.
11. List any two applications of sed.
12. Differentiate between grep and sed.
13. What is awk used for in UNIX?
14. Explain the difference between head and tail commands with
examples.
15. Write the general format of an awk command.
16. What are associative arrays in awk?
17. Mention any two string functions available in awk.
18. What is the difference between awk and grep?
UNIT – IV
10 Marks:
1. Explain in detail the features of the Korn Shell and how it differs
from other UNIX shells.
2. Describe the purpose and use of the two special files associated
with the Korn Shell.
3. Explain variable declaration and usage in Korn Shell with
examples.
4. Discuss exit status codes of commands and how they can be used
for decision-making.
5. Explain the working of the eval command with suitable examples.
6. Describe environmental variables and how they affect shell
execution.
7. Write a Korn Shell script for decision-making using if–else
statements?
8. Explain the command history feature in Korn Shell and how
previous commands can be reused.
9. Describe the command execution process in the Korn Shell in
detail.
10. Explain the basic concepts of shell scripting and steps to write
and execute a script.
11. Discuss various expressions used in shell programming with
examples.
12. Explain different decision-making constructs in Korn Shell such
as if, case, and test.
13. Explain repetition statements (for, while, until) in shell
programming with examples.
14. Discuss special parameters and variables available in Korn Shell.
15. Explain how positional parameters are assigned, accessed, and
modified with examples.
16. Discuss the methods of argument validation in shell scripts with
examples.
17. Explain debugging techniques in shell scripting and the use of set
-x and set +x.
18. Develop a Korn Shell script Check given number is Even or odd
Number?

2 Marks :
1. What is the Korn Shell?
2. List any four important features of the Korn Shell.
3. What are the two special files used in Korn Shell?
4. Define a variable in Korn Shell.
5. How do you assign a value to a variable in Korn Shell?
6. What does the exit status of a command indicate?
7. Write the command to display the exit status of the last executed
command.
8. What is the purpose of the eval command?
9. Define environmental variables in the Korn Shell.
10. What are shell startup scripts?
11. What is the purpose of command history in Korn Shell?
12. Write the command to display the last executed command in the
history.
13. What is meant by the command execution process in the shell?
14. Define decision-making scripts.
15. Write the syntax of an if statement in Korn Shell.
16. What are positional parameters in shell scripting?
17. How can positional parameters be changed?
18. What is the use of debugging in shell scripts?\
UNIT – V
10 Marks:
1. Explain the main features of the C Shell and compare it with
Bourne and Korn shells.
2. Describe the purpose and usage of the two special files in C Shell.
3. Explain the process of declaring, initializing, and using variables in
C Shell with examples.
4. Discuss input and output handling in C Shell with suitable
commands and syntax.
5. Explain exit status of commands and its importance in shell
scripting.
6. Describe the working of the eval command in C Shell with
examples.
7. What are environmental variables? Explain how they are created,
viewed, and exported.
8. Explain the concept of on-off variables and their significance in C
Shell programming.
9. Describe startup and shutdown scripts used in C Shell.
10. Explain the command history mechanism and how previous
commands can be recalled.
11. Describe the process of command execution in C Shell with
internal and external commands.
12. Explain the fundamentals of C Shell programming with syntax
and examples.
13. Discuss the decision-making and looping constructs used in C
Shell programming.
14. Explain how communication between users is established using
UNIX utilities.
15. Write a C Shell script for decision-making using Iterative
statements?
16. Explain the structure and execution process of a simple C Shell
script.
17. Develop a C Shell script Generate odd Numbers up to given
Number?
18. Write and explain any two C Shell script examples demonstrating
input/output handling and looping.

2 Marks :
1. What is the C Shell in UNIX?
2. List any four features of the C Shell.
3. Name the two special files used in C Shell.
4. Define a variable in C Shell.
5. How do you assign a value to a variable in C Shell?
6. Write the command to display the value of a variable.
7. What is the purpose of output redirection in C Shell?
8. Write a command to take input from a file in C Shell.
9. What does the exit status of a command represent?
10. Write the syntax to display the exit status of the last command.
11. What is the function of the eval command in C Shell?
12. Define environmental variables.
13. What are on-off variables in C Shell? Give an example.
14. What is the purpose of startup scripts in C Shell?
15. Name the files executed during C Shell startup and shutdown.
16. What is command history in C Shell?
17. Write the command used to display the command history list.
18. What is the use of email communication in UNIX?

You might also like