2013-12-25 11:17:18 +00:00
|
|
|
# wc
|
|
|
|
|
2019-11-14 16:58:45 +00:00
|
|
|
> Count lines, words, or bytes.
|
2021-03-30 14:48:08 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html>.
|
2013-12-25 11:17:18 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Count lines in file:
|
2013-12-25 11:17:18 +00:00
|
|
|
|
|
|
|
`wc -l {{file}}`
|
|
|
|
|
2016-02-10 17:46:05 +00:00
|
|
|
- Count words in file:
|
|
|
|
|
|
|
|
`wc -w {{file}}`
|
|
|
|
|
|
|
|
- Count characters (bytes) in file:
|
2013-12-25 11:17:18 +00:00
|
|
|
|
|
|
|
`wc -c {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Count characters in file (taking multi-byte character sets into account):
|
2013-12-25 11:17:18 +00:00
|
|
|
|
|
|
|
`wc -m {{file}}`
|
2020-05-29 12:01:37 +01:00
|
|
|
|
|
|
|
- Use standard input to count lines, words and characters (bytes) in that order:
|
|
|
|
|
|
|
|
`{{find .}} | wc`
|