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 6

phonebk

  #!/bin/bash
  grep -i $1 $HOME/bin/phonebk.csv | sed "s/,/, /g"
  echo

Output looks like this:

  dlink@viddev1> phonebk link
  Link,  David, 1181, Development, [email protected]

  dlink@viddev1> phonebk dario
  Dario,  Steve, 1191, IT, [email protected]

  dlink@viddev1> phonebk development
  Borne,  Igor, 1174, Development, [email protected]
  Chow,  Lin, 1182, Development, [email protected]
  Howardson,  Trevor, 1112, Development, [email protected]
  Johnson,  Mike, 1144, Development, [email protected]
  Link,  David, 1181, Development, [email protected]
  Ongger,  Sal, 1149, Development, [email protected]
  Salvidori,  Ron (Woody), 1143, Development, [email protected]
  Schelly,  Corley, 1190, Development, [email protected]
  Sikvar,  Joe, 1104, Development, [email protected]
  Siztaouni,  Joe, 1140, Development, [email protected]
  Vance,  Dan, 1173, Development, [email protected] 
  Zaouri,  Frank, 1113, Development, [email protected]
  Giri, 1177, Development, 
  Mubeena, 1111, Development,