Difference between revisions of "CLI I/O Redirection"

From FreekiWiki
Jump to navigation Jump to search
Line 11: Line 11:
  
 
== Abbreviations ==
 
== Abbreviations ==
 +
 +
=== stdio ===
 +
<  = Send to
 +
 +
=== stdout ===
 +
1>  = Redirect stdout, overwrite specified file
 +
1>> = Redirect stdout, append specified file
 +
 +
=== stderr ===
 +
2>  = Redirect stderr, overwrite specified file
 +
2>> = Redirect stderr, append specified file
  
 
== Examples ==
 
== Examples ==

Revision as of 12:55, 22 March 2008

Introduction

The Command Line Interface (CLI) provides three types of input/output (I/O) flow.

  1. stdin = "Standard In;" input passed to a command
  2. stdout = "Standard Out;" output from a command
  3. stderr = "Standard Error;" error output from a command

This means that there are two types of output from any command stdout and stderr. It also means that you can separate them.

Commands

Abbreviations

stdio

<   = Send to

stdout

1>  = Redirect stdout, overwrite specified file
1>> = Redirect stdout, append specified file

stderr

2>  = Redirect stderr, overwrite specified file
2>> = Redirect stderr, append specified file

Examples

Quiz