summaryrefslogtreecommitdiff
path: root/doc/bash.1
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bash.1')
-rw-r--r--doc/bash.114
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/bash.1 b/doc/bash.1
index bfe60293..27e26ac0 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -3560,7 +3560,10 @@ This is semantically equivalent to
\fB>\fP\fIword\fP 2\fB>&\fP1
.RE
.PP
-(see \fBDuplicating File Descriptors\fP below).
+When using the second form, \fIword\fP may not expand to a number or
+\fB\-\fP. If it does, other redirection operators apply
+(see \fBDuplicating File Descriptors\fP below) for compatibility
+reasons.
.SS Appending Standard Output and Standard Error
.PP
This construct allows both the
@@ -3688,8 +3691,15 @@ is not specified, the standard output (file descriptor 1) is used.
If the digits in
.I word
do not specify a file descriptor open for output, a redirection error occurs.
+If
+.I word
+evaluates to
+.BR \- ,
+file descriptor
+.I n
+is closed.
As a special case, if \fIn\fP is omitted, and \fIword\fP does not
-expand to one or more digits, the standard output and standard
+expand to one or more digits or \fB\-\fP, the standard output and standard
error are redirected as described previously.
.SS "Moving File Descriptors"
.PP