Bash redirections - handling several filenames specially (man pages)
3
votes
1
answer
160
views
Please confirm/correct me. I've found related https://unix.stackexchange.com/questions/248012/duplication-of-file-descriptors-in-redirection but that does not answer my specific question.
From the *The GNU Bash Reference Manual*, section 3.6 Redirections :
> Bash handles several filenames specially when they are used in redirections, as described in the following table. If the operating system on which Bash is running provides these special files, bash will use them; otherwise it will emulate them internally with the behavior described below.
>
>
/dev/fd/fd
- If *fd* is a valid integer,
file descriptor *fd* is duplicated.
/dev/stdin
- File descriptor 0 is duplicated.
/dev/stdout
- File descriptor 1 is duplicated.
/dev/stderr
- File descriptor 2 is duplicated.
Asked by Martian2020
(1443 rep)
Apr 11, 2025, 03:38 AM
Last activity: Apr 11, 2025, 10:05 AM
Last activity: Apr 11, 2025, 10:05 AM