javascript - Write multiple strings to stdout and pipe them separately -
is possible pipe each string written standard out command?
// file example.js #!/usr/bin/env node process.stdout.write('foo') process.stdout.write('bar')
when run ./example.js | wc -m
6, value of character length of both foo
, bar
together.
i'd values 3 , 3 separately. have special within javascript file? or command?
wc -m counts number of characters in input. can't make separate/group line (or other grouping matter). has nothing js code.
if you'd type of counting other means, it's not difficult node!
Comments
Post a Comment