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

<<   >>
.bash_profile

There is a special file, sometimes called .bash_profile, sometimes called .profile

It is executed each time you evoke an interactive login shell.

Currently, mine looks something like this:

  test -z "$PROFILEREAD" && . /etc/profile
  
  if [ -x /usr/bin/fortune ] ; then
      echo
      /usr/bin/fortune
      echo
  fi
  
  # video development:
  if [ -d $HOME/video/bin ] ; then
    PATH=$PATH:$HOME/video/bin
    . $HOME/video/bin/video_aliases
  fi
  
  # global development:
  if [ -d $HOME/global/bin ] ; then
    PATH=$PATH:$HOME/global/bin
    . $HOME/global/bin/aliases
  fi
  
  . /usr/local/apache2/bin/apache2_aliases
  . myaliases
  
  #. work/pg813/aliases
  
  umask 002