Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Raspbian

You're reading from  Learning Raspbian

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781784392192
Pages 154 pages
Edition 1st Edition
Languages
Author (1):
William Harrington William Harrington
Profile icon William Harrington

Table of Contents (15) Chapters

Learning Raspbian
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Raspberry Pi and Raspbian Getting Started with Raspbian Starting Raspbian An Introduction to the Raspbian Desktop Installing Software on Raspbian The Console Other Linux Distributions Based on Raspbian References Index

Redirection in bash


One of the more advanced features of bash are the redirection operators. These operators allow you to divert the input or output of a command to another command or file. While this sounds simple, it is an extremely powerful feature. There are several redirection operators built into bash, as shown here:

Operator

Description

|

This is a general-purpose command that chains similar to >

>

This redirects the output of a command to a file

<

This reads a file and passes it to the command

>>

This appends the output of the command to a file

Redirection operators

The | operator is a general-purpose command-changing tool. A simple example of this is to use it with cat and the program more. The more program is a simple program that lets you move backward and forward throughout a file on the screen in order to read it. The more command gets the data that you want to read from the cat command. The | operator connects two programs together.

The more and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}