Index of /dee/utils/wordcount
Name Last modified Size Description
Parent Directory -
wordcount1.m2.txt 2019-07-16 01:25 1.7K
wordcount0.m2.txt 2019-09-22 14:21 591
wordcount.m2.txt 2019-09-22 14:35 1.5K
wordcount.exe 2019-09-22 14:35 118K 64-bit Windows binary
SHA256 2019-09-22 14:36 80
README.html 2019-09-22 14:40 931
PROGRAM
wordcount: count words from the standard input
USAGE
wordcount [ -a | -l | -w | -c ]
DESCRIPTION
wordcount provides a count of the words, text lines, and single
byte characters from a text stream.
A word is a sequence of characters bounded by a new line, a blank,
or a horizontal tab.
Remember that the standard ASCII newline is two characters,
i.e. CRLF. On Unix, GNU/Linux, and Plan 9, there's a more robust
command: wc.
EXAMPLE
C:\Users\David> wordcount
hello, world
^Z
2
C:\Users\David> wordcount -a
hello, world
^Z
1 2 13
C:\Users\David> echo hello, world | wordcount -a
1 2 14
C:\Users\David> echo hello, world > hello.txt
C:\Users\David> <hello.txt wordcount -a
1 2 14
C:\Users\David> type hello.txt | wordcount -a
1 2 14
BUGS
The defintion of a word is simplistic.