UNIX AND SHELL
PROGRAMMINGUNIX AND SHELL PROGRAMMING
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2015 -2016)
SEMESTER
Subject Code 15C835 TA Marks 20
Number of Lecture Hours/Week 04 Exam Marks 80
‘Total Number of Lecture Hours 50 Exam Hours 03
CREDITS ~ 04
Module -1 10 Hours
Introduction, Brief history. Unix Components/Architecture. Features of Unix. The UNIX Environment
and UNIX Structure, Posix and Single Unix specification. The login prompt. General features of Unix
commands) command structure. Command arguments and options. Understanding of some basic
commands such as echo, printf, Is, who, date, passwd, cal, Combining commands. Meaning of Intemal
and extemal commands. The type ‘command: knowing the type of a command and locating it. The man
command knowing more about Unix commands and using Unix online manual pages. The man with
keyword option anid whatis. The more command and using it with other commands. Knowing the user
terminal, displaying its characteristics and setting characteristics. Managing the nonuniform behaviour
of terminals and keyboards. The root login. Becoming the super user: Su command. The /etc/passwd.
and /etc/shadow files. Commands to add, modify and delete users.
Module -2 10 Hours
Unix files. Naming files. Basic file types/categories. Organization of files. Hidden files. Standard
directories. Parent child relationship. The home directory and the HOME variable. Reaching required
files- the PATH variable, manipulating the PATH, Relative and absolute pathnames. Directory
commands ~ pwd, cd, mkdir, rmdir commands. The dot {.) and double dots (..) notations to represent
present and parent directories and their usage in relative path names. File related commands - cat,
my, 1m, cp, we and od commands. File attributes and permissions and knowing them. The Is command
with options. Changing file permissions: the relative and absolute permissions changing methods
Recursively changing file permissions. Directory permissions.
Module -3 10 Hours
The vi editor. Basics. The .exrc file. Different ways of invoking and quitting vi. Different modes of vi.
Input mode commands. Command mode commands. The ex mode commands. Illustrative examples
Navigation commands. Repeat command. Pattem searching. The search and replace command, The
set, map and abbr commands. Simple examples using these commands. The shells interpretive cycle
Wild cards and file name generation. Removing the special meanings of wild cards. Three standard files,
and redirection. Connecting commands: Pipe. Splitting the output: tee. Command substitution. Basic
and Extended regular expressions. The grep, egrep. Typical examples involving different regular
expressions.
Module -4 10 Hours
Shell programming. Ordinary and environment variables. The .profile. Read and readanly commands
Command line arguments. ‘exit and exit status of 2 command. Logical operators for conditional
execution. The test command and its shortcut. The if, while, for and case control statements. The set
and shift commands and handling positional parameters: The here ( << ) document and trap
command. Simple shell program examples. File Inodes and the inode structure. File links ~ hard and
soft links. Filters. Head and tail commands. Cut and paste commands. The sort commend and its usage
with different options. The umask and default file permissions. Two special files /dev/null and /cev/tty.Module -5 10 Hours
Meaning of a process. Mechanism of process creation. Parent and child process. The ps command with
its options. Executing a command at a specified point of time: at command. Executing 2 command
Periodically: cron command and the crontab file.. Signals. The nice and nohup commands. Background
processes. The bg and fg command. The kill command. The find command with illustrative example
Structure of a pert script. Running a perl script. Variables and operators. String handling functions:
Default variables - $_ and $. - representing the current line and current line number. The range
operator. Chop() and chomp) functions. Lists and arrays. The @- variable. The splice operator,
pushl), popl), split() and join(). File handles and handling file - using open(), close() and die ()
functions.. Associative arrays - keys and value functions. Overview of decision making loop control
structures ~ the foreach. Regular expressions - simple and multiple search patterns. The match and
substitute operators. Defining and using subroutines.
Visvesvaraya Technological University "Jnana S Belagavi Visvesvaraya Technological University "Jnana Sangama", Machhe Belagavi-590018 Visvesvaraya Technological University Machhe