In this chapter, we'll look at how to manage input and output for Bash commands, specifying where any input into a command should come from, and where any output or errors from it should go. We can manage each of these using Bash's support for classic shell redirection, specifying a source or a destination for the data in the form of a path to a file.
In addition to file-based redirection, we'll also explore the use of pipes to transparently direct the output of one command straight into the input of another, a powerful means of composing (or combining) programs by having them work together. We'll also take a brief look at some general data-filtering possibilities using the sed and AWK programming languages.
In this chapter, we'll cover the following topics:
- Managing input and output from programs
- Controlling file-based...