G9M6o

                       control bus
                   -----\-------\------
      Humans A      2    \       \      Humans B
      (Collector)        /       /
                   -----/---+---/------
                            |
                          * v 2>&1
                            |
      Lucifer's WC =1==>====+=====>==== Hell
      
      *) Introduced on Stage 2
      
Pipes and Redirection
---------------------

Every program we run on the command line automatically has three data streams connected to it*1.

    STDIN  (0) - Standard input
    STDOUT (1) - Standard output
    STDERR (2) - Standard error

Redirections:  <   >   >>   2>    2>&1
Pipes:         |   mkfifo   pipe  tee

Dazibao 2:

  +--------------------------------------------------------------+
  | One tool is sharpened for single purpose.                    |
  | Use proper tools and combine them using pipes and in scripts |
  +--------------------------------------------------------------+

Examples

1. How to see X help on terminal?

     $ X --help 2>&1 | less

2. Simple linux: kernel + busybox.
   How many commands contains installed version of busybox?

     $ busybox | tail -n 25 | wc -w
     221
  
See also [1] [2].
  
Links
-----

  1. http://ryanstutorials.net/linuxtutorial/
  2. http://www.linuxjournal.com/article/2156
  3. http://stackoverflow.com/questions/1251999
     /how-can-i-replace-a-newline-n-using-sed
