1

node.js spawn を使用して端末コマンドを実行しようとしています

そのためにコードを使用しています

console.log(args)

var child = spawn("hark", args, {cwd: workDir});
        child.stdout.on('data', function(data) {

          console.log(data.toString())        
        });

        child.stderr.on('data', function(data) {
          console.log('stdout: ' + data);

        });

        child.on('close', function(code) {
          console.log('closing code: ' + code);

        });

But it treated greater than> as string">" として出力を得る

tshark: Invalid capture filter "> g.xml" 

    That string isn't a valid capture filter (syntax error).
    See the User's Guide for a description of the capture filter syntax.

>文字列なしで使用するにはどうすればよいですか

4

1 に答える 1