wc: refresh (#7391)
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
# wc
|
||||
|
||||
> Count lines, words, or bytes.
|
||||
> Count lines, words, and bytes.
|
||||
> More information: <https://www.gnu.org/software/coreutils/wc>.
|
||||
|
||||
- Count lines in file:
|
||||
- Count all lines in a file:
|
||||
|
||||
`wc -l {{file}}`
|
||||
`wc --lines {{path/to/file}}`
|
||||
|
||||
- Count words in file:
|
||||
- Count all words in a file:
|
||||
|
||||
`wc -w {{file}}`
|
||||
`wc --words {{path/to/file}}`
|
||||
|
||||
- Count characters (bytes) in file:
|
||||
- Count all bytes in a file:
|
||||
|
||||
`wc -c {{file}}`
|
||||
`wc --bytes {{path/to/file}}`
|
||||
|
||||
- Count characters in file (taking multi-byte character sets into account):
|
||||
- Count all characters in a file (taking multi-byte characters into account):
|
||||
|
||||
`wc -m {{file}}`
|
||||
`wc --chars {{path/to/file}}`
|
||||
|
||||
- Use standard input to count lines, words and characters (bytes) in that order:
|
||||
- Count all lines, words and bytes from `stdin`:
|
||||
|
||||
`{{find .}} | wc`
|
||||
|
||||
- Count the length of the longest line in number of characters:
|
||||
|
||||
`wc --max-line-length {{file}}`
|
||||
`wc --max-line-length {{path/to/file}}`
|
||||
|
Reference in New Issue
Block a user