Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahamas10/node-wcs
A tool like wordcount that supports continuous streams at a regular interval
https://github.com/bahamas10/node-wcs
Last synced: 15 days ago
JSON representation
A tool like wordcount that supports continuous streams at a regular interval
- Host: GitHub
- URL: https://github.com/bahamas10/node-wcs
- Owner: bahamas10
- Created: 2012-10-17T21:52:35.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-08T02:01:58.000Z (almost 12 years ago)
- Last Synced: 2024-04-14T01:07:29.227Z (9 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
wcs (word count streams)
========================A tool like wordcount that supports continuous streams at a regular interval
Install
------Install the command line utility `wcs`
npm install -g wcs
Usage
-----Usage: stream | wcs [interval]
tail -f | wcs 1000
Example
-------If stdin finishes, the program acts just like wc(1)
$ echo 'hello how are you?' | wc
1 4 19
$ echo 'hello how are you?' | wcs
1 4 19However, unlike wc(1), `wcs` will count frequency at a regular interval
(1000 ms by default, can be changed by setting the first argument), so
you can do cool things like...$ while sleep 1; do echo 'hello how are you?'; done | wcs
1 4 19
1 4 19
1 4 19
1 4 19
^C
$ while sleep .5; do echo 'hello how are you?'; done | wcs
2 8 38
2 8 38
2 8 38
2 8 38
^CKnown Issues
------------* Some weirdness with buffering/back pressure on the pipe...
don't fully trust the outputLicense
-------MIT Licensed