pavement

Stdout

From FreeBSDwiki
Revision as of 15:01, 28 May 2007 by Jimbo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

stdout is the standard output of a program - which, typically, is dumped to the console unless you've redirected 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.

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.

Personal tools