OneUNITTwo PARTorI hour

helmetpastoralSoftware and s/w Development

Dec 13, 2013 (3 years and 10 months ago)

61 views

Sub Code: 06CS36

UNIX AND SHELL PROGRAMMING

(Common to CSE/ISE)


PART A


Note
:
One

question to be set from each
UNIT
.
Two

questions from
each

PART

is

compulsory
. It is advised to arrange for a
demonstration

or

practical

session

at the end
of every UNIT fo
r
I hour

for the students to get a practical insight into the UNIX
commands taught.


UNIT 1


The UNIX Operating System:
The Operating System, the UNIX Operating System.

The UNIX Architecture and Command Usage:

The UNIX architecture, Features of UNIX,
Loca
ting Commands, Internal and External Commands,
Command

structure,
Flexibility

of Command usage, Man browsing the manual pages online,
Understanding

the man
documentation

The File System
: The file, What is a filename, The Parent Child relationship, The
home

variable,
pwd
,
cd
,
mkdir
,
rmdir
, absolute pathnames, relative pathnames,
ls
, The UNIX

file system










6 Hours


UNIT 2


Basic file attributes
: ls

l,
-
d
, file ownership, file permissions,
chmod
, directory
permissions, changing file ownership
.

The vi editor:

v
i basics, Input mode, saving text and quitting, navigation, editing text,
undoing last editing instructions, repeating the last command, searching fo
r

a pattern,
substitution










6 Hours


UNIT 3


The Shell
: The shell’s inte
rpretive cycle, Shell offerings, Pattern matching, Escaping and
Quitting, Redirection,
/dev/null
,
/dev/tty
, Pipes,
tee
, Command Substitution, Shell
Variables

The Process
: Process Basics,
ps
, System Processes, Mechanism of Process Creation,
Internal and Ext
ernal Commands,
Process States and Zombies, Running Jobs in the
background,
nice
: Job execution and Low priority
, Killing Process with signals

Customizing the Environment
: The Shells, Environment Variables, The Common
Environment Variables,

The initializa
tion scripts.





7

Hours


UNIT 4


More file attributes
:
File Systems and Inodes, Hard
-
links, Symbolic Links and
ln
,
umask
,
Modification and Access times, find

Simple filters:
The sample database,
pr, head, tail, cut, paste, sort, uniq, tr 7 Hours


PART B


UNIT
5


Filers using Regular Expressions
-
grep

and
sed
:
grep
,
BRE

and
ERE
,
sed
, Line
Addressing, Using multiple Instructions, Context Addressing, Writing Selected Lin
e
s to a
file, Text Editing
, Substitution.








6 Hours



UNIT 6


Essential Shell Programming:
Shell scripts, read, using command line arguments,
exit

and exit status of command, The logical operators
&&,||

--

Conditional Execution, The if
conditional
, Using
test

and
[ ]

to evaluate expressions, The case conditional,
ex
pr
,
$0
,
while
,
for
,
set

and
shift

, the
here

document,
trap
, debugging shell scripts using

set

x







6 Hours



UNIT 7


A
wk
-
an ad
vanced filter:
Simple
awk

filtering, Splitt
ing a line into fields,
printf
, variables
and expressions, Comparison operators, Number Processing, Variables,
-
f

option, The
BEGIN

and
END

sections, Built
-
in variables, Arrays, Functions, Control Flow, Looping
with
for
, Looping with
while
.






7

H
ours


UNIT 8


PERL the master manipulator
:
PERL preliminaries, The
chop

function, Variables and
Operators, The String handling functions, Specifying Filenames in command line,
$_
:
The default variable, Current line number
$
. and the Range operator
(…)
,
List
s and
arrays,
Foreach
,
split
,
join
,
dec2bin
.
pl
,
grep
, Associative Arrays, Regular Expressions
and Substituti
ons, File Handling, File Tests




7

Hours



Text Book


“UNIX

Concepts and Applications”
, Sumitabha

Das
, 4th

Edition,
Tata McGr
aw
Hill, 2006

(
Chapters 1
-
1.1, 1.2.
Chapter 2
-
2.1,2.2, 2.4
-
2.9,
Chapter 4
-
4.1
-
4.12,
Chapter 6
-
6.1
-
6.7
,
Chapter 7
-
7.1
-
7.9,
Chapter 8
-
8.1
-
8.10,
Chapter 9
-
9.1
-
9.9
,
Chapter 10
-
10.1
-
10.3,10.8
,
Chapter 11
-
11.1
-
11.3,11.5
-
11.7
,
Chapter 12
-
12.1
-
12.10
,
Chapter 13
-
13.1
-
13.1
0,
Chapter 1
4
-
14.1
-
14.16.
Chapter 18
-
18.1
-
18.15
,
Chapter

19
-
19.1
-
19.1
7
)


References

Books


UNIX and Shell Programming,

Behrouz A. Forouzan and Richard F.Gilberg
, Thomson,
2005


UNIX & Shell Programming,
M.G, Venkaesh
murthy,

Pearson Education
, 2005