[Gllug] This morning`s shell script question

t.clarke tim at seacon.co.uk
Thu May 24 08:05:17 UTC 2007


Stderr to a pipe   - interesting !
It would seem that the standard shell on Unix (not looked at bash) does
not provide the ability to redirect stderr to a pipe,  only stdout.

Possibly you could redirect stderr to a file and then cat the file to a
pipe and then delete the temp file?
eg:
command   2> temp.file
cat temp.file | log-cmd
rm temp.file

clumsy and of course log-cmd wont see the stderr until command completes :-(


I imagine there must be a way to do it somehow,  but whether or not that
involves something other than straightforward shell-scripting is another matter!

Tim
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list