diff --git a/pages/common/wc.md b/pages/common/wc.md index 6f29f3e534..797ba65541 100644 --- a/pages/common/wc.md +++ b/pages/common/wc.md @@ -22,3 +22,7 @@ - Use standard input to count lines, words and characters (bytes) in that order: `{{find .}} | wc` + +- Count the length of the longest line in number of characters: + +`wc --max-line-length {{file}}` diff --git a/pages/osx/wc.md b/pages/osx/wc.md new file mode 100644 index 0000000000..6f29f3e534 --- /dev/null +++ b/pages/osx/wc.md @@ -0,0 +1,24 @@ +# wc + +> Count lines, words, or bytes. +> More information: . + +- Count lines in file: + +`wc -l {{file}}` + +- Count words in file: + +`wc -w {{file}}` + +- Count characters (bytes) in file: + +`wc -c {{file}}` + +- Count characters in file (taking multi-byte character sets into account): + +`wc -m {{file}}` + +- Use standard input to count lines, words and characters (bytes) in that order: + +`{{find .}} | wc`