Differences

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

Link to this comparison view

Both sides previous revision Previous revision
syntax:redirection [2011/11/08 21:02]
thebonsai [Redirection]
syntax:redirection [2013/04/14 12:30] (current)
thebonsai Don't tread version 4 special - it has been around for a long time now
Line 85: Line 85:
 </​code>​ </​code>​
  
-:V4: Since Bash4, there'​s ''&<​nowiki>>>​TARGET</​nowiki>'',​ which is equivalent to ''<​nowiki>>></​nowiki>​ TARGET 2>&​1''​.+Since Bash4, there'​s ''&<​nowiki>>>​TARGET</​nowiki>'',​ which is equivalent to ''<​nowiki>>></​nowiki>​ TARGET 2>&​1''​.
  
 <wrap center important>​This syntax is deprecated and should not be used. See the page about [[scripting:​obsolete |  obsolete and deprecated syntax]].</​wrap>​ <wrap center important>​This syntax is deprecated and should not be used. See the page about [[scripting:​obsolete |  obsolete and deprecated syntax]].</​wrap>​
Line 97: Line 97:
 </​code>​ </​code>​
  
-:V4: 
 <​code>​ <​code>​
 &>>​ FILE &>>​ FILE
Line 107: Line 106:
 </​code>​ </​code>​
  
-:V4: 
 <​code>​ <​code>​
 COMMAND1 |& COMMAND2 COMMAND1 |& COMMAND2
Line 164: Line 162:
 The tag you use **must** be the only word in the line, to be recognized as end-of-here-document marker. The tag you use **must** be the only word in the line, to be recognized as end-of-here-document marker.
  
-<wrap center info>It seems that here-documents (tested on versions ''​1.14.7'',​ ''​2.05b''​ and ''​3.1.17''​) are correctly terminated when there is an EOF before the end-of-here-document tag. The reason is unknown, but it seems to be done on purpose. ​:V4: Bash 4 introduced a warning message when end-of-file is seen before the tag is reached.</​wrap>​+<wrap center info>It seems that here-documents (tested on versions ''​1.14.7'',​ ''​2.05b''​ and ''​3.1.17''​) are correctly terminated when there is an EOF before the end-of-here-document tag. The reason is unknown, but it seems to be done on purpose. Bash 4 introduced a warning message when end-of-file is seen before the tag is reached.</​wrap>​
  
  
  • syntax/redirection.1320786173.txt
  • Last modified: 2011/11/08 21:02
  • by thebonsai