This is imho the best guide for shell scripting. I’m always referencing it when writing a shell script ( was it -n or -z?)
From: http://linuxcommand.org/writing_shell_scripts.php#contents
With the thousands of commands available for the command line user, how can you remember them all? The answer is, you don’t. The real power of the computer is its ability to do the work for you. To get it to do that, we use the power of the shell to automate things. We write scripts.
Scripts are collections of commands that are stored in a file. The shell can read this file and act on the commands as if they were typed at the keyboard. In addition to the things you have learned so far, the shell also provides a variety of useful programming features to make your scripts truly powerful.
What are scripts good for? A wide range of tasks can be automated. Here are some of the things I automate with scripts:
Check It Out:
LinuxCommand.org: Writing shell scripts.








