This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
syntax:redirection [2010/12/09 01:50] external edit
syntax:redirection [2011/11/08 21:02]
thebonsai [Redirection]
Line 27: Line 27:
 </​code>​ </​code>​
-The redirection operation can be **anywhere** ​on the command ​line, so these examples are **equivalent**:+The redirection operation can be **anywhere** ​in a simple ​command, so these examples are equivalent:
 <​code>​ <​code>​
 cat foo.txt bar.txt >new.txt cat foo.txt bar.txt >new.txt
Line 208: Line 208:
 <​code>​ <​code>​
 command >/​dev/​null 2>&1 command >/​dev/​null 2>&1
-__**alternative**__ (by closing both filedescriptors):​ 
-command >&- 2>&- 
 </​code>​ </​code>​
  • syntax/redirection.txt
  • Last modified: 2013/04/14 12:30
  • by thebonsai