G.
PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY, KURNOOL
COURSE STRUCTURE
A33108– UNIX & SHELL PROGRAMMING
Hours Per Week Hours Per Semester Credits Assessment Marks
L T P L T P C CIE SEE Total
1 0 2 14 0 28 2 40 60 100
1. Course Description
Course Overview
The main objective of this course is to familiarize with the Unix/Linux command line and running
simple commands and concept of environment variables and with the simple use of environment
variables.
Course Pre/Co-requisites
The course has no specific prerequisite and co-requisites.
2. Course Outcomes (COs)
After completion of the course, the student will be able to:
A33108.1 Understand the basic unix/linux commands
A33108.2 Learn importance of shell scripting
A33108.3 Apply shell programming to various files
A33108.4 Improve individual / teamwork skills, communication & report writing skills with
ethical values
3. Course Syllabus
Basic Linux Commands : Study of Unix/Linux general purpose utility command list obtained from (man,
who, cat, cd, cp, ps, ls, mv, rm, mkdir, rmdir, echo, more, date, time, kill, history, chmod, chown, finger,
pwd, cal, logout, shutdown) commands, study of vi editor, study of Unix/Linux file system
Introduction to Shell : Introduction to Shell, Shell responsibilities, running a shell script. Variables,
passing arguments, Basic Operators, Basic String Operations, Decision Making, Loops, Arrays, Arrays –
Comparison, Shell functions.
Advanced Shell : Special Variables, Bash trap command, File Testing, Input Parameter Parsing,
Pipelines, Process Substitution, Regular Expressions, Special Commands: sed, awk, grep, sort.
Example Programs:
1. Use of Basic UNIX Shell Commands: ls, mkdir, rmdir, cd, cat, touch, file, wc, sort, cut,
grep,dd, dfspace, du, ulimit
2. Commands related to inode, I/O redirection and piping, process control commands, mails.
3. Shell Programming: Shell script exercises based on following:
(i) Interactive shell scripts (ii) Positional parameters (iii) Arithmetic (iv) if-then-fi, if-then- else-fi,
G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY, KURNOOL
nested if-else (v) Logical operators (vi) else + if equals elif, case structure (vii) while, until, for
loops, use of break
4. Write a shell script to create a file. Follow the instructions
(i) Input a page profile to yourself, copy it into other existing file
(ii) Start printing file at certain line
(iii) Print all the difference between two file, copy the two files.
(iv) Print lines matching certain word pattern.
5. Write shell script for-
(i) Showing the count of users logged in,
(ii) Printing Column list of files in your home directory
(iii) Listing your job with below normal priority
(iv) Continue running your job after logging out
6. Write a shell script to change data format. Show the time taken in execution of this script.
7. Write a shell script to print files names in a directory showing date of creation & serial numberof
the file.
8. Write a shell script to count lines, words, and characters in its input (do not use wc).
4. Books and Materials
Text Book(s)
1. Learning the bash Shell, 3rd Edition by Cameron Newham, Publisher(s): O'Reilly Media,Inc.,
ISBN: 9780596009656.
Reference Book(s)
1. UNIX and Shell Programming by Behrouz A. Forouzan, Richard F. Gilberg Publisher:Thomson
Press (India) Ltd, ISBN: 9788131503256, 9788131503256.
2. Shell Scripting: Expert Recipes for Linux, Bash, and More by Steve Parker