From 3c04a05ea417d211e46cb1aab9fb1a1df357bb4e Mon Sep 17 00:00:00 2001 From: yegorc Date: Thu, 25 Sep 2025 23:35:16 +0000 Subject: [PATCH] Added documentation for `&>>`. The `&>>` redirection was undocumented. Closes #11824 --- doc_src/language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/language.rst b/doc_src/language.rst index ce7ddb03f..95535e37f 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -181,7 +181,7 @@ The destination of a stream can be changed using something called *redirection*. - An ampersand (``&``) followed by the number of another file descriptor like ``&2`` for standard error. The output will be written to the destination descriptor. - An ampersand followed by a minus sign (``&-``). The file descriptor will be closed. Note: This may cause the program to fail because its writes will be unsuccessful. -As a convenience, the redirection ``&>`` can be used to direct both stdout and stderr to the same destination. For example, ``echo hello &> all_output.txt`` redirects both stdout and stderr to the file ``all_output.txt``. This is equivalent to ``echo hello > all_output.txt 2>&1``. +As a convenience, the redirection ``&>`` can be used to direct both stdout and stderr to the same destination. For example, ``echo hello &> all_output.txt`` redirects both stdout and stderr to the file ``all_output.txt``. This is equivalent to ``echo hello > all_output.txt 2>&1``. You can also use ``&>>`` to append both stdout and stderr to the same destination. Any arbitrary file descriptor can be used in a redirection by prefixing the redirection with the FD number.