pavement

Stdout

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
'''stdout''' is the '''standard output''' of a program - which, typically, is dumped to the [[console]] unless you've [[redirect]]ed it somewhere else.
+
'''stdout''' is the ''standard output'' stream of a program - which, typically, is dumped to the [[console]] unless you've [[redirect]]ed it somewhere else.
  
'''stdin''' is the '''standard input''' of a program - in other words, where it typically receives data.  You may [[pipe]] one program's '''stdout''' to another program's '''stdin''' - for example, '''ls -l /usr/ports/www | [[grep]] php''' will make the [[grep]] utility look for the word "php" in the output of the [[ls]] of the www [[ports]] directory.
+
'''stdin''' is the ''standard input'' stream of a program - in other words, where it typically receives data.  You may [[pipe]] one program's '''stdout''' to another program's '''stdin''' - for example, '''ls -l /usr/ports/www | [[grep]] php''' will make the [[grep]] utility look for the word "php" in the output of the [[ls]] of the www [[ports]] directory.
  
'''stderr''' is the '''standard error''' of a program - generally, if not redirected, it will also dump to the console with '''stdout''' but in a bright white color instead of the light gray color of '''stdout'''.  It is useful to have programs write error or system messages to '''stderr''' instead of '''stdout''' so that they may be redirected elsewhere from normal program output - for example, to a log file.
+
'''stderr''' is the ''standard error'' stream of a program - generally, if not redirected, it will also dump to the console with '''stdout''' but in a bright white color instead of the light gray color of '''stdout'''.  It is useful to have programs write error or system messages to '''stderr''' instead of '''stdout''' so that they may be redirected elsewhere from normal program output - for example, to a log file.
  
 
[[Category:FreeBSD Terminology]]
 
[[Category:FreeBSD Terminology]]

Latest revision as of 15:02, 28 May 2007

stdout is the standard output stream of a program - which, typically, is dumped to the console unless you've redirected it somewhere else.

stdin is the standard input stream of a program - in other words, where it typically receives data. You may pipe one program's stdout to another program's stdin - for example, ls -l /usr/ports/www | grep php will make the grep utility look for the word "php" in the output of the ls of the www ports directory.

stderr is the standard error stream of a program - generally, if not redirected, it will also dump to the console with stdout but in a bright white color instead of the light gray color of stdout. It is useful to have programs write error or system messages to stderr instead of stdout so that they may be redirected elsewhere from normal program output - for example, to a log file.

Personal tools