Re: Filtering socklog output revisited

Laurent Bercot <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <[email protected]>
> At first - exec with pipe doesn't work, look at this example:
> 
> --- exec.sh ---
> #!/bin/bash
> exec sed s/a/b/ | cat
> ---

 Why, what you need here is execline. :)
 http://www.skarnet.org/software/execline/pipeline.html

 But anyway, I doubt this construction is the solution to Lloyd's problem.
 The issue with pipes is one of reliability : if the pipe isn't maintained
open by some process, and one of the end closes, then there is a possible
loss of data, which supervision tools are designed to avoid.
 The solution is, always use the same pipe, make sure it never closes.
If you can't do it with the help of your supervision suite, because the
pipe writer is already the "log" service, then you must do it another way;
the FIFO trick is probably the simplest one.

-- 
 Laurent
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.