Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wc 用法错误 #20

Open
Gnosnay opened this issue Jul 16, 2019 · 0 comments
Open

wc 用法错误 #20

Gnosnay opened this issue Jul 16, 2019 · 0 comments

Comments

@Gnosnay
Copy link

Gnosnay commented Jul 16, 2019

过滤器/README.md 中wc命令解释有问题

常用选项 描述
l 只统计行数
w 只统计单词数
m 只统计字符数
c 只统计字节数
L 最大行的长度
不管指定选项的顺序如何,其信息显示的顺序都是固定的,遵从上面从上到下的顺序。  
若不加参数,则默认显示l,w,m三项。

若不加参数,则默认显示l,w,m三项。说明有误。实际应该等价于 -lwc

ref

By default, wc prints three counts: the newline, words, and byte counts.

造成误解的一个很大的原因可能因为,字符数和字节数在某些情况下相等了。为什么相等呢?因为

  1. 运行wc的机器对文件内容的解码可能不支持某些特殊字符
  2. 文件内容就是单纯的ascii码
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant