O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required