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

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -