Shell Scripting is a Programming Language for Shells.
See safe use of the shell for some good tips.
Understanding I/O streams numbers
The Unix / Linux standard I/O streams with numbers:
| Handle | Name | Description |
| 0 | stdin | Standard input |
| 1 | stdout | Standard output |
| 2 | stderr | Standard error |
Redirecting the standard error (stderr) and stdout to file
Use the following syntax:
command-name &>file
# or
command > file-name 2>&1