Input/output redirection in the Bash shell
Data Flow

© Lead Image © xyzproject, 123RF.com
The Bash shell lets you string several commands together if the capabilities of a single tool do not meet your needs.
Bash commands are very useful for configuring, managing, troubleshooting, and hundreds of other tasks. The power of the shell, however, really becomes apparent when you learn to chain individual programs and redirect the output.
You can link individual commands together in Bash in just a few steps. Instead of the sequence in the first three lines of Listing 1, you can combine the individual work steps and, using the semicolon, tell the interpreter to run all commands one after another (last line).
You can gain even more control by imposing a condition on Bash – for example, by only letting Bash run a second (or third or nth) command if another command was successful or unsuccessful.
[...]
Buy this article as PDF
(incl. VAT)