[Bro-Dev] open a pipe?

Gregor Maier gregor at majordomus.org
Sun Mar 25 08:32:38 PDT 2012


On 3/16/12 6:22 , Seth Hall wrote:
> How hard would it be to modify files so that we could use them like a pipe to another program?  I'll give an example…
>
> global myfile = open("| shasum>  output");
> print myfile, "hello";
> close(myfile);

Robin's comments aside, also note that you can implement a single pipe 
with popen() et al., but in order to add further output redirection or 
multiple pipes (e.g. your "> output") you need to run a shell (or a lot 
of work to do it without a shell)

cu
Gregor


More information about the bro-dev mailing list