Changes

Jump to: navigation, search

Tutorial5: Redirection

2 bytes added, 12:17, 25 January 2020
Redirection (Standard Input, Standard Output, Standard Error)
'''Standard input''' ('''stdin''') is a term which describes from where a command receives input.<br>
This would apply only to Unix/Linux commands that accept stdin input (like ''cat'', ''more'', ''less'', ''sort'', ''grep'', ''head'', ''tail'', etc.).<br>
 
''Examples:''
<table align="right"><tr><td>[[Image:stdout-symbol-1.png|thumb|right|250px|The '''standard input''' ('''stdin''') symbol with one greater than sign overwrites existing file content with command output]]</td><td>[[Image:stdout-symbol-2.png|thumb|right|250px|The '''standard input''' ('''stdin''') symbol with two greater than signs add command's output to bottom of existing file's contents.]]</td></tr></table>
'''Standard output''' ('''stdout''') describes where a command sends it's output.<br>In the examples below, output from a command is sent to the '''monitor''', unless it is sent to a '''regular file'''.<br>We will discuss another redirection technique called '''pipelines''' later.
 
''Examples:''
13,420
edits

Navigation menu