Chapter 5. Shell input and output

To be able to read data into your scripts you have a few different methods available to you: use the standard input which is your keyboard, or assign a file as the input. The same goes for the output: unless you specify a file as the output, the standard output will always go to your terminal screen. If you have errors that are generated from the commands that you use, you probably do not want these messing up your screen, so you can redirect these messages to another output, generally a file.

Most of the commands that use standard input usually specify files as their standard input – why key in a load of data, when it can be read in via a file?

In this chapter we will cover:

  • using standard input, output and ...

Get Linux and Unix Shell Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.