Redirecting input and output


Article from Issue 82/2007

Working in the shell has many benefits. Pipelines, redirectors, and chains of commands give users almost infinite options.

Combining shell commands lets you leverage the power of the command line. This not only includes linking individual programs, but also forwarding command output. For example, if the information you need disappears from the screen too fast for you to read, you can simply redirect it to a file or use a pager.

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Hotwire Interactive Shell

    The Hotwire shell removes the complexities of interactive consoles. We’ll show you how to Hotwire your Linux with this handy text and graphical shell for developers and administrators.

  • Bash 4

    Despite the Bourne-again shell's biblical age and high level of maturity, developers continue to work on it. We take a look at the latest Bash release.

  • Bash Tricks

    The Bash shell is powerful and infinitely expressive. In this article we describe some tricky techniques you can use to enhance and customize your Bash environment.

  • Command Line: sed

    Working with a text editor can be difficult if you need to handle frequently recurring tasks or multiple files. sed can save a lot of typing.

  • Bash 4.0 Introduces Associative Arrays

    The GNU Project's Bourne Again Shell (bash) is now in its fourth major version, which provides numerous enhancements.

comments powered by Disqus

Direct Download

Read full article as PDF: