Have you tried:
fs=require('fs');
console.log(fs.readFileSync('/dev/stdin').toString());
However, it will wait for the ENTIRE file to be read in, and won’t return on \n like scanf or cin.
Have you tried:
fs=require('fs');
console.log(fs.readFileSync('/dev/stdin').toString());
However, it will wait for the ENTIRE file to be read in, and won’t return on \n like scanf or cin.