2013

62 downloads 281 Views 2MB Size Report
Introduction to UNIX/LINUX Operating System. 1.1. 1. Features of UNIX/LINUX .... Das S., UNIX Concepts and Applications 4th Edition, McGraw-Hill [DAS]. 3.
B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Paper No.:030010502 Objective:

Subject: LINUX and Shell Programming

To provide the student working environment in UNIX/LINUX operating system including various utilities for file management, communication, process management, pattern matching and to develop shell script.

Course Outcomes: Upon completion of the course, students shall be able to CO1:

Associate with the working environment in UNIX/LINUX operating system including its file system.

CO2:

Interpret and use of utilities including file management with wild card in UNIX/LINUX environment.

CO3:

Use of shell features like redirection, pipe, communication and filter utilities, wildcard characters, programming construct and running jobs.

Unit

1.

CO4:

Develop, debug & execute shell script.

CO5:

Develop and use of regular expression with pattern matching utilities like grep, sed and awk.

Sub Unit

Reference Chapter/Additional Reading

Teaching Evaluation Methodolog Parameters y

Introduction to UNIX/LINUX Operating System (Total: 08 lectures) 1.1 1

1.2

Features of UNIX/LINUX operating system UNIX/LINUX Structure: Kernel and Shell

FOR #1 Page No. 3–4, 8–10 DAS#2 Page No. 25-27 KLJ#1 Page No. 7-9,9-13 VMG#1 Page No. 6-9

1.3

2

Basic commands, Accessing help in UNIX/LINUX

FOR #1 Page No. 13–29 VMG#1 Page No. 13-30

1.4

2

Filenames and using wild cards Types of files

FOR#3 Page No. 65–68, 68-75 VMG#2 Page No. 55-58 BAC#4 (All pages)

UNIX/LINUX File system: four block of file systems, directory hierarchy

FOR #3 Page No. 75–80 NPG#4 Page No. 28-29

Operations and directory and files

FOR #3 Page No. 80-112

1.5 1.6 1.7

2.

Topics

No. of Lecture(s)

2 1

utilities

for

Presentation, Hands on Training , Chalk & Talk

Theory Quiz-1

Security, File permissions and Job control (Total: 06 lectures) 2.1

1

Users, group and ownership of files

FOR #4 Page No. 121–122

2.2

1

Security levels customization: variables

and shell Environment

FOR #4 Page No. 122–126 FOR #13 Page No. 521-528

2.3

1

File permissions: permissions and permissions

File attribute, changing file

FOR #4 Page No. 126–130 VMG#3 Page No. 71–84

2.4

1

User masks, changing ownership and groups

FOR #4 Page No. 131–134 VMG#3 Page No. 84–89

2

Job control: process, jobs, foreground and background jobs, ps command, job commands Job scheduling: at and batch commands, cron jobs

FOR #5 Page No. 165–170 NPG#9 (All pages)

2.5 2.6

Mr. Jitendra Upadhyay

Chalk & Talk, Hands on Training

Page 1

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU

3. Introduction to Shell (Total: 07 lectures) UNIX shell and its types

3.1 3.2 3.3

3.4

2

Command execution: sequenced, grouped, chained and conditional command, exit status of command

FOR #5 Page No. 154–156

1

Quotes and command substitution: backslash, double quotes and single quotes, Command substitutions and eval command

FOR #5 Page No. 159–165 FOR #13 Page No. 519–520

Special files: trace file and terminal files

FOR #13 Page No. 516–518

Environmental variables, startup scripts and command history

FOR #13 Page No. 530–537

Shell’s interpretive cycle

FOR #13 Page No. 536–537 DAS#8 Page No. 169

1 3.6

4.

1

Chalk & Talk, Hands on Training

Unit Test -1

Filters and communication utilities (Total: 07 lectures) 4.1

1

4.2 4.3

1

3 4.5 4.6

Filters: Introduction, with filters

using

pipe

Concatenating files

4.4

5.

FOR #1 Page No. 08, FOR #5 Page No. 146-153

2

3.5

3.7

Features of shell: standard streams, redirection, pipes

2

Display beginning and end of files Splitting files, cut, paste, sorting and translating characters

FOR#6 (All pages) DAS#12 (All pages) VMG#4 Page No. 101-116

Files with duplicate lines, counting character, words and lines and comparing files Communication utilities

Presentation , Hands on Training

Practical Quiz, Theory Quiz 2

FOR#7 (All pages) VMG#10 (All pages)

Shell Programming (Total: 10 lectures) 5.1

Basic script concept

5.2

Shell variable: predefined variables and user defined variable, storing value in variable and accessing it, unsetting variables, storing filenames, content and command in variable.

2

Input: reading word by word, line by line and from file

5.3 5.4

1

Expression

5.5

4

Decisions and repetition

5.6 5.7 5.8

Special parameters and variables

2

Changing positional parameters and argument validation

1

String manipulation

Mr. Jitendra Upadhyay

FOR#14 Page No. 547–553 FOR #4 Page No. 122–126 FOR #13 Page No. 504–514 FOR#13 Page No. 521-528

FOR#13 Page No. 516–518

Chalk & Talk, Hands on Training

Practical Internal – 1, Unit Test -2

FOR#14 Page No. 555-597

FOR#15 Page No. 622-629

Page 2

6.

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU

Regular Expression and utilities (Total: 10 lectures) Regular expressions: operators

6.1 4

6.2 6.3

atoms

and

grep: working of grep grep family

FOR#10 Page No. 351–362 DAS#13 Page No. 245-254 FOR#11 Page No. 373–406

6.4

1

sed utility

6.5

2

awk: fields and records, awk script, operation, patterns and actions

6.6

Associative array in awk

3

6.7

FOR#9 Page No. 331–343

Functions in awk: string functions, mathematical functions and user defined functions

Presentation , Hands on Training

Practical Internal – 2, Theory Internal

FOR#12 Page No. 425–469 VMG#9 (All pages) DAS#18 (All pages) NPG#18 (All pages)

Self Creation Parameter: Assignment (From all Units) Text Book: Forouzan B. A., Gilberg R. R., UNIX and Shell Programming, Thomson [FOR] References : 1. Das S., UNIX Concepts and Applications, McGraw-Hill [DAS] 2. Venkateshmurthy M. G., UNIX & Shell Programming, PEARSON [VMG] 3. K.L.James Linux – Learning the Essential, PHI [KLJ] 4. N.P.Gopalan & B. Sivaselvan, A beginner’s Guide to UNIX, PHI [NPG] Note : # denotes chapter number.

Course Objectives and Course Outcomes Mapping: 

Working in UNIX/LINUX operating system environment: CO1, CO2



Use of utilities for file management and process management: CO2, CO3



Use of communication and filter utilities: CO3



Identify pattern matching: CO5



To develop shell script: CO4

Course Units and Course Outcomes Mapping: Unit No.

Unit

Course outcome CO1

CO2

CO3

1

Introduction to UNIX/LINUX Operating System







2

Security, File permissions and Job control







3

Introduction to Shell



4

Filters and communication utilities



5

Shell Programming



6

Regular Expression and utilities

Mr. Jitendra Upadhyay

CO4

CO5











Page 3

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Course Outcomes and Program Outcome Mapping: Course Outcome

PO1

PO2

PO3

PO4

PO5

PO6

CO1 √

CO2





CO3









CO4









CO5









Computing Environment: A student shall have the following computing environment in laboratory as well as on their personal laptop: 

RedHat LINUX enterprise V4 operating system on server and students having account on LINUX system.

Modes of Transaction (i.e. Delivery) Appropriate methods of teaching shall be decided depending on the objectives of the content taught. 

Lecture method shall be used for all units. For unit 1 and 6 lecture delivery shall be supplemented with audio-visual aids for the topics namely Features of UNIX/LINUX operating system, UNIX/LINUX Structure: Kernel and Shell, Types of Files, UNIX/LINUX file system, regular expression, grep family and their working, awk utitlity. For Unit 2 to 5 hands-on sessions shall be conducted with emphasis on command structure, its uses and shell programming.



Self Study of following part of the syllabus shall be done by the students: 4.6 – Communication utilities, 6.7 – User defined functions in awk

Activities/Practicum: The following activities shall be carried out by the students. 1.

Collection of output generated by utilities and interprets given teacher or in exercise in text book.

2.

Prepare chart on various flavor of LINUX, important files and directory etc.

3.

Historical study of the UNIX operating system.

The following activities shall be carried out by the teacher. 1.

Demonstrate Linux operating system installation.

2.

Discuss booting Process of LINUX operating system.

Mr. Jitendra Upadhyay

Page 4

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Concept Map:

Course : LINUX and Shell Programming

Unit – 1 Introduction to UNIX/LINUX Operating System

Mr. Jitendra Upadhyay

Page 5

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Unit – 2 Security, File permissions and Job control

Unit – 3 Introductions to Shell Introduction to Shell

covers covers

UNIX shell & its types

covers Shell variables

include covers

covers Special files

include

Command execution Features of shell include

include

include

streams

Redirection include

Predefined / Enviornment variable include

sequenced

include Standard

Shell interpretation cycle

User defined variable

Grouped include chained and conditional command

Pipes

Mr. Jitendra Upadhyay

Page 6

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Unit – 4 Filters and communication utilities

Unit – 5 Shell Programming

Mr. Jitendra Upadhyay

Page 7

B. V. Patel Institute of Business Management Computer 2014 and Information Technology, UTU Unit – 6 Regular Expression and utilities

Mr. Jitendra Upadhyay

Page 8