CMP319 – Introduction to BASH Shell Scripting

Written by Mfawa Alfred Onen on . Posted in Courses

This section will contain course materials and scripts for CMP319

Course Materials

CMP319 Course Objectives

CMP 319 – Introduction to BASH Shell Scripting

CMP319 Scripts

Links to Software used

Oracle Virtualbox

Putty

Tutorials

Tutorial Questions

Tutorial Answers (Scripts)

Class Work (Scripts) -> 20/01/2014

Environment Setup

Screencasts

Video 1

Topics Covered

/etc/profile
~/.bash_profile
~/.bashrc
~/.bash_logout

BASH Built-ins

ls
cd
cp
mv
export
set

BASH command line expansion

Tilde Expansion (~)
Parameter/Variable Expansion  (${variable_name})

 

Video 2

Topics Covered

BASH History

~/bash_history
HISTFILE
HISTFILESIZE

Aliases

Backticks

Command expansion and execution

BASH Prompt

Configuration

 

Video 3

Topics Covered

Command Chaining

Error Level/Return Code

Test Return 0
Test Return 126
Test Return 127

Conditional Execution

 

Video 4

Topics Covered

Redirection

Standard Input (File descriptor 0)
Standard Output (File descriptor 1)
Standard Error (File descriptor 2)

Quoting/Escaping

Single Quote (Full Quoting)
Double Quote (Partial Quoting)

BASH script definition, permissions & script execution

Video 5

Topics Covered

Function definition


functionName(){
Compound command
}

Or


function functionName(){
Compound command
}

Arrays

 

Video 6

Topics Covered

Positional Parameters
Loops

For
While
Until

 

Video 7

Topics Covered

Menu Creation using select
Conditional Testing

IF
Else
Case

Trackback from your site.

Mfawa Alfred Onen

I am a System Administrator and I work at Bingham University.