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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -