bash - Process substitution - Node.js child_process -


i'm trying run child process modify file (in 2 steps) before reading modified content stdout. i'm trying using process substitution works in bash not when try node.

this kind of, command looks like..

var p = exec('command2 <(capture /dev/stdout | command1 -i file -) -', function (error, stdout, stderr) {    console.log(stderr); }); 

stderr prints:

/bin/sh: -c: line 0: syntax error near unexpected token `(' 

what proper way of doing in node?

i solved putting commands in shell script , calling script node child process. needed add following set bash in posix mode allow process substitution:

set +o posix 

there nicer way of doing directly within node did job. cheers!


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -