view · edit · attach · print · history

Introduction To Bash Shell Scripting

Where: Milne 130
Date: Wednesday, April 14th
Time: 5:00 - 6:50pm
Workshop files: Browse
Reference sites: BASH Programming - Introduction HOW-TO, Advanced Bash-Scripting Guide

What is Bash?

"Bash is a shell, which is a program that reads commands and executes them. Sometimes, the commands that Bash reads come directly from the keyboard as you type them. When this happens, we say that Bash is an interactive shell. If you've ever logged into a UNIX system, then you've used an interactive shell. Bash is the default interactive shell of the GNU/Linux system (and you might also find it installed on commercial UNIX systems). Sometimes, the commands that Bash reads come from a file called a shell script. When this happens, we say that Bash is a non-interactive shell. In this case, Bash reads each line of the script file from top to bottom, executing each command as if it had been typed on the keyboard." (Liunx Review)

What will this workshop cover?

Below is a basic outline of what I will prepare to cover. Of course, if we run out of time, we run out of time.

  1. Basics
    1. Create a "Hello World!" script
    2. Execute the above script
    3. Variables

  2. Control Syntax
    1. if, elsif, else
    2. Loops
      1. for
      2. while
      3. until

  3. File IO & Redirection
    1. Write/Append

  4. Functions
    1. Syntax
    2. Passing Data To / From

  5. Calling Arguments
    1. passing variables when starting the shell script
view · edit · attach · print · history
Page last modified on April 12, 2005, at 11:58 PM