mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 15:40:39 +00:00

The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
var util = require('util');
|
|
|
|
var regexIn = process.argv[2];
|
|
var replacement = process.argv[3];
|
|
var re = new RegExp(regexIn, 'g');
|
|
var stdin = process.openStdin();
|
|
|
|
stdin.on('data', function(data) {
|
|
data = data.toString();
|
|
process.stdout.write(data.replace(re, replacement));
|
|
});
|