Skip to content

Commit 5040cfc

Browse files
committed
update with generate-doc.js
1 parent 07b5349 commit 5040cfc

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,27 @@ uniq('-cd', 'foo.txt', 'bar.txt');
656656
Filter adjacent matching lines from input
657657

658658

659+
### wc([options,] file [, file ...])
660+
### wc([options,] file_array)
661+
Available options:
662+
+ `-m`: print the char counts
663+
+ `-l`: print the newline counts
664+
+ `-w`: print the word counts (space delimited characters)
665+
666+
Examples:
667+
668+
```javascript
669+
var counts = wc('file.txt'); //returns charCount lineCount wordCount
670+
var charCount = wc('-m','file.txt'); //returns number of characters
671+
var lineCount = wc('-l','file.txt'); //returns number of newlines
672+
var wordCount = wc('-w','file.txt'); //returns number of words
673+
var countFiles = wc('file1', 'file2'); // returns 'file1' charCount lineCount wordCount\n'file2' charCount lineCount wordCount\n'total' lineCount
674+
var countFiles = wc(['file1', 'file2']); //same as above
675+
```
676+
677+
Read the end of a file.
678+
679+
659680
### which(command)
660681

661682
Examples:

0 commit comments

Comments
 (0)