2016-05-23 14 views

Antwort

1

Öffnen Sie einfach als Datei und schreiben, um es :)

var fs = require('fs'); 
var tty = fs.createWriteStream('/dev/tty'); 

console.log('hello'); 
tty.write('foo\n'); 
tty.write('bar\n'); 
0

so fand ich eine Art und Weise, aber das Betrug angesehen werden könnten;)

var exec = require('child_process').exec 
process.stdout.write('writing to stdout') 
exec("echo 'writing to the terminal without writing to stdout' > /dev/tty")