The bash shell is just amazing. There are so many tasks that can be simplified using its handy features. This tutorial tells about some of those features, explains what exactly they do and learns you how to use them.
bash
Small getopts tutorial
When you want to parse commandline arguments in a professional way, getopts is the tool of choice. Unlike its older brother getopt (note the missing s!), it's a shell builtin command. The advantage is
* you don't need to hand your positional parameters through to an external program
* getopts can easily set shell variables you can use for parsing (impossible for an external process!)
* you don't have to argue with several getopt implementations which had buggy concepts in the past (whitespaces, ...)
* getopts is defined in POSIX®
Bash Tests
The test application, also known as [, is an application that usually resides somewhere in /usr/bin or /bin and is used a lot by shell programmers to perform certain tests on variables. In a number of shells, including bash, [ is implemented as a shell builtin.
Difference between test, "[" and "[[":
http://mywiki.wooledge.org/BashFAQ/031
network programming in bash
Discusses the possibilities of using Bash for socket programming using /dev/tcp with file descriptors redirection.
Linux Command Line Reference
Linux command line reference for common operations...
vim BASH IDE
Write BASH-scripts by inserting comments, statements, tests, variables, builtins, etc..
Speed up writing new scripts considerably. Write code and comments with a professional appearance from the beginning....
Bash Comparison Operators
Very helpful when unsure on using the type of comparison operators and brackets to use in bash.
Writing Robust Shell Scripts
Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It's possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts...
Variable Mangling in Bash with String Operators
Have you ever wanted to change the names of many files at once? Or, have you ever needed to use a default value for a variable that has no value? These and many other options are available to you when you use string operators in bash and other Bourne-derived shells...
Handling files with spaces
Typical Unix users cringe at the thought of putting spaces in file names. Mac users, on the other hand, frequently put spaces in file names because it's natural and may read better. This means that Mac OS X Unix geeks need to make sure their shell commands (and shell scripts) work correctly when faced with spaces in file names. Below is outlined a few simple ways to properly deal with this...