Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Here is a nodejs console application that reads the stdin stream, converts the text to uppercase and dumps it to stdout
// main.js
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin
});
rl.on('line', function(line){
console.log(line.toUpperCase());
});
rl.on('end', function(){
process.exit(0);
});
cat some.file.txt | node main.js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question