From FreeBSDwiki
Revision as of 15:02, 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 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