wc(word count)是 Linux 中用于统计文件的行数、单词数和字符数的命令。它是文本处理中常用的统计工具。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
➜ wc --help 用法: wc [选项]... [文件]... 或: wc [选项]... --files0-from=F Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read standard input.
-c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts -w, --words print the word counts --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - thenread names from standard input --help display this help and exit --version output version information and exit