[Gllug] This morning`s shell script question

Alain Williams addw at phcomp.co.uk
Thu May 24 08:31:30 UTC 2007


On Thu, May 24, 2007 at 09:23:00AM +0100, t.clarke wrote:
> That's very interesting - redirecting 2> to a >(        )   !!
> 
> I shall have to try it on my Unix box as well and see if it works there.
> A handy tip for the future.
> 
> I tried also the following kludge, out of interest:_
> mkfifo   /tmp/xyz
> log-command < /tmp/xyz &
> command  2> /tmp/xyz
> rm /tmp/xyz

That is sort of what you get with >&p in ksh.

> 'command' will send stderr throught the named-pipe /tmp/xyz to 'log-cmd',
> which executes in 'background' and terminates when 'command'itself terminates.


-- 
Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list