Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
190 views2 pages

Unix Shell

This document provides an overview of a course on UNIX Shell and System Programming. The course objectives include executing C programs under UNIX, using basic shell commands, implementing simple filters and understanding the UNIX process environment. The course covers topics like shell scripts, file attributes, command substitution, string handling and processes. Students will learn to develop shell scripts, apply file permissions and pattern matching, design signal functions and develop processes in UNIX.

Uploaded by

Vasudeva Acharya
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)
190 views2 pages

Unix Shell

This document provides an overview of a course on UNIX Shell and System Programming. The course objectives include executing C programs under UNIX, using basic shell commands, implementing simple filters and understanding the UNIX process environment. The course covers topics like shell scripts, file attributes, command substitution, string handling and processes. Students will learn to develop shell scripts, apply file permissions and pattern matching, design signal functions and develop processes in UNIX.

Uploaded by

Vasudeva Acharya
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
You are on page 1/ 2

UNIX SHELL & SYSTEM PROGRAMMING

Course Code: IS1602-1 Course Type PCC Lab


Teaching Hours/Week (L: T: P: S) 0:0:2:0 Credits 01
Total Teaching Hours 26 CIE + SEE Marks 50+50
Prerequisite NIL
Teaching Department: Information Science & Engineering
Course Objectives:
1. Execute programs written in C under UNIX environment.
2. Demonstrate how to use the basic Bourne Shell commands like cat, grep, ls, more, ps, chmod etc.
3. Study about simple filters, grep and sed filters.
4. Implement the Unix system process environment.
5. Understand the Unix kernel environment.
List of Experiments
1. Basic Unix Commands, Simple Shell scripts
1. Illustrate the usage of Unix commands and vi editor concept.
2. Implement a shell program to find and display largest and smallest of three numbers
2. Simple Shell scripts/Command Substitution
1. Find the number n is divisible by m or not using shell script. Where m and n are supplied as
command line argument or read from key board interactively
2. Plan and implement a shell program to search a pattern in a file that will take both pattern and file
name from the command line arguments.
3. File attributes/expr command demonstration
1. Design a shell program that takes two file names, checks the permissions for these files are
identical and if they are identical, output the common permissions; otherwise output each file name
followed by its permissions.
2. Implement a shell program to display the length of the name and also display first three characters
and last three characters in the name in two different lines if the name contains at least 6 characters.
4. Arithmetic operators/Command Substitution
1. Write a shell program to implement simple calculator operations.
2. Design a Shell Program that takes the any number of arguments and print them in same order and
in reverse order with suitable messages.
5. String handling operations/Command Substitution
1. For the given path names (E.g., a/b,a/b/c), design a shell script to create all the components in
that path names as directories.
2. Develop a shell script that performs following string handling operations i) Calculate the length
of the string ii) locate a position of a character in a string iii) extract last three characters from string
6. Command Substitution
1. For every filename, check whether file exists in the current directory or not and then convert its
name to uppercase only if a file with new name doesn’t exist using shell script.
2. Execution of exercise Shell scripts
7. Process
1. C program to do the following: Using fork( ) create a child process. The child process prints its
own process-id and id of its parent and then exits. The parent process waits for its child to finish (by
executing the wait( )) and prints its own process-id and the id of its child process and then exits.
2. C program that creates a child process to read commands from the standard input and execute
them (a minimal implementation of a shell - like program). You can assume that no arguments will
be passed to the commands to be executed.
8. Signal
1. Write a C Program to register signal handler for SIGINT and when it receives the signal, the
program should print some information about the origin of the signal.
2. Write a C program which illustrates sending signal from one process to another by using kill API.
Also check if the program has permission to send the signal or not.
9. Write a C Program to register signal handler for SIGSTOP.
10. AWK scripts
Write a C Program to handle user defined signals.
11. AWK scripts
Write a C Program to create a Daemon process.
12. Miscellaneous
Exercise of shell programs, C programs on processes and signals

Course Outcomes: At the end of the course student will be able to


1. Interpret Unix commands to get familiarized with Unix operating system.
2. Develop and implement shell script file using UNIX commands.
3. Apply the concept of file attributes and filters to understand about the file permissions and pattern
matching.
4. Design and implement signal functions.
5. Develop and implement processes in the Unix environment.

Course Outcomes Mapping with Program Outcomes & PSO


Program Outcomes→ 1 2 3 4 5 6 7 8 9 10 11 12 PSO↓
↓ Course Outcomes 1 2
IS1602-1.1 3 1
IS1602-1.2 2 1 2 2 2
IS1602-1.3 2 1 2 2 2
IS1602-1.4 2 1 2 2 2
IS1602-1.5 2 1 2 2 2
1: Low 2: Medium 3: High

REFERENCE BOOKS:
1. “Unix and Shell Programming”, M.G. Venkateshmurthy, Pearson Education, 2005.
2. “UNIX and Shell Programming”, Behrouz A. Forouzan and Richard F. Gilberg, Thomson 2005.
(Chapters Appendix H,9).
E Resources
1. For Introduction to Shell scripting
https://swayam.gov.in/nd2_aic20_sp05/preview
2. For Processes & Signals
geekstuff.com

You might also like