Bash Shell Scripting
Crash Course
crowfly.net

<<   >>

Introduction

GNU_Tools

Example1

Example2

Execution_bit

Bang_bin_bash

Example3

The_dot

Example4

Example5

Example6

Example7

Example8

Background

Forking

Example9

Bash_profile

Pattern_match

Regex

Debug

Gory_details

References

<<   >>
Example 2

Here is a slightly more interesting script, talk.sh:

  #!/bin/bash

  echo Hello $USER,
  echo -n "Today is " ; date +"%A"
  echo -n "Today's date is " ; date +"%d-%b-%Y"
  echo -n "And the time is " ; date +"%r"

The output looks like this:

  dlink@viddev1> ./talk.sh
  Hello dlink,
  Today is Thursday
  Today's date is 20-Jul-2006
  And the time is 11:51:59 AM