This entry is part 1 of 19 in the Bash-whacking series

Starting a new blog series on bash scripts you shouldn't live without.

Installation for scripts is simple: either add them to /usr/bin or add ~/bin to your bash path and place your scripts there. Don't forget to make the scripts executable!

Here's a complete example:

Suppose you wanted to create a script called foobar and make it accessible from anywhere.

First add create ~/bin, then add it to your bash path.


Add this to the end of the file:


Now you need to enter a new bash shell for your settings to take effect (or logout and log back in).

Then, go ahead and create the script:


Paste this in

span class="st0">"Foobar"

Save and exit, then make the script executable.


Now from any directory, you can type foobar and get this back: