c - passing a pipe as an argument to sort -m -
i wondering if possible send multiple pipes lets 3 arguments merged sort -m in c.
for example execvp("sort", "sort", "-m", pipe1_read_end, pipe2_read_end, null)
if targeting linux, can pass strings of form:
/dev/fd/<number>
...representing pipes, <number>
is, of course, fd table entry number file descriptor in question. in fact, bash if run
sort -m <(something) <(something)
for more os-agnostic solution, 1 typically uses named fifos (and bash <()
construct if detects it's on operating system doesn't provide /dev/fd/
).
Comments
Post a Comment