Redirection
From FreeBSDwiki
(Difference between revisions)
Line 5: | Line 5: | ||
< sends output the other way | < sends output the other way | ||
<< appends output the other way | << appends output the other way | ||
− | | sends output | + | | sends output to a program (frequently, a [[:Category:System Commands|system command]] like [[grep]]) |
If you're using the [[bash]] shell, because you're not a sadist and like useful shells, you also have some special options available to you: you can redirect standard input, standard output and standard error messages. | If you're using the [[bash]] shell, because you're not a sadist and like useful shells, you also have some special options available to you: you can redirect standard input, standard output and standard error messages. |
Revision as of 19:20, 30 August 2004
Sending one form of output to a form of input other than that which it was originally intended. Common operands include: >, >>, <, <<, and the ever popular |.
> sends output somewhere (usually a file) >> appends output somewhere (without overwriting it) < sends output the other way << appends output the other way | sends output to a program (frequently, a system command like grep)
If you're using the bash shell, because you're not a sadist and like useful shells, you also have some special options available to you: you can redirect standard input, standard output and standard error messages.