Iam trying to execute a terminal command using node.js spawn
tshark -i 3 -Y "ipp contains 02:00:00:00" -T pdml > ggggg.xml
for that am using the code
var args = ['-i', '3',
'-Y',
"ipp contains 02:00:00:00" ,'-T','pdml','>','ggggg.xml'];
console.log(args)
var child = spawn("tshark", 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">" and
getting output as
tshark: Invalid capture filter "> gggggg.xml"
That string isn't a valid capture filter (syntax error).
See the User's Guide for a description of the capture filter syntax.
How can i use > without string
child_process.execwhich will call shell.