View Issue Details

IDProjectCategoryView StatusLast Update
0000493tcshGeneralpublic2023-12-02 03:11
ReporterMProG10 Assigned To 
PrioritynormalSeveritytextReproducibilityN/A
Status newResolutionopen 
Summary0000493: Workaround to pipe stdout off stderr.
DescriptionI'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 Informationhttps://github.com/tcsh-org/tcsh/pull/82
TagsNo tags attached.

Activities

MProG10

2023-12-02 03:11

reporter   ~0003984

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
tcsh.man.in.diff (460 bytes)   

Issue History

Date Modified Username Field Change
2023-12-01 21:56 MProG10 New Issue
2023-12-02 03:11 MProG10 Note Added: 0003984
2023-12-02 03:11 MProG10 File Added: tcsh.man.in.diff