Linux之wc命令

wc - print newline, word, and byte counts for each file

   为文件打印行数,字符数,字节数

参数:

  -l  仅列出行

  -w  仅列出多少字(英文单字)

  -m  多少字符

  -b  多少字节

  -L 打印最长的行

说明:为什么会有仅呢,因为默认wc=wc -lwm

[root@BASE test]# cat /etc/passwd|wc

[root@BASE test]# cat /etc/passwd|wc -l

[root@BASE test]# cat /etc/passwd|wc -w

[root@BASE test]# cat /etc/passwd|wc -m

[root@BASE test]# cat /etc/passwd|wc -c

[root@BASE test]# cat /etc/passwd|wc -L

[root@BASE test]# 
上一篇:Javascript模版引擎mustache.js简介


下一篇:URAL 2037 Richness of binary words (回文子串,找规律)