search for: read_output

Displaying 2 results from an estimated 2 matches for "read_output".

2020 Mar 16
0
pipe(): input to, and output from, a single process
...if `pipe()` works for this, but if it turns out that it does not, then you can use the processx package, e.g.: > p <- processx::process$new("sed", c("-l", "s/a/x/g"), stdin = "|", stdout = "|") > p$write_input("foobar\n") > p$read_output() [1] "foobxr\n" The `-l` sed flag is to make sed line-buffered, otherwise it is will not produce output until there is enough. `$write_input()` and `$read_output()` are not easy to program, in particular: * `$write_input()` returns the chunk of data that it hasn't managed to write...
2020 Mar 13
7
pipe(): input to, and output from, a single process
hi. i'd like to instantiate sed(1), send it some input, and retrieve its output, all via pipes (rather than an intermediate file). my sense from pipe and looking at the sources (sys-unix.c) is that is not possible. is that true? are there any thoughts of providing such a facility? cheers, Greg