View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000493 | tcsh | General | public | 2023-12-01 21:56 | 2023-12-02 03:11 |
Reporter | MProG10 | Assigned To | |||
Priority | normal | Severity | text | Reproducibility | N/A |
Status | new | Resolution | open | ||
Summary | 0000493: Workaround to pipe stdout off stderr. | ||||
Description | I've come across certain situations where the traditional sub-shell method doesn't always solve the problem of independent stderr redirection, resulting in creation of a FIFO. The following snippet allows for independent stderr redirection. ( ( ( echo ok ; no ) > /dev/fd/0 ) >& /dev/null < /dev/fd/1 ) | ( echo "$<" ) | ||||
Additional Information | https://github.com/tcsh-org/tcsh/pull/82 | ||||
Tags | No tags attached. | ||||
|
tcsh.man.in.diff (460 bytes)
--- a/tcsh.man.in +++ b/tcsh.man.in @@ -3282,6 +3282,13 @@ or may be .Pa /dev/tty to send output to the terminal. +.Pp +Because diagnostic output can't be +redirected alone, to pipe the +output, if the system +supports file descriptors as files, +.Dl \&( \&( \&( Ar command Li ; Ar command Li ) > Ar /dev/fd/0 Li ) >& Ar error-file Li < Ar /dev/fd/1 Li ) | Ar command +suffices. . .Ss Features Having described how the shell accepts, parses and executes |