【问题标题】:What is the difference between commands "wc `grep -l int *`" and "grep -l int * | wc"?命令“wc `grep -l int *`”和“grep -l int * | wc”有什么区别?
【发布时间】:2015-03-30 15:06:24
【问题描述】:

这两个命令有什么区别:

wc `grep -l int *`
grep -l int * | wc

输出有何不同?

【问题讨论】:

  • 你试过这些命令吗?做一个man wcwc 给出行数、单词数、字母数。

标签: unix grep command wc


【解决方案1】:
wc `grep -l int *`

这将为您提供包含字符串“int”的每个文件的字数/行数/字符数。

grep -l int * | wc`

这将为您提供grep -l int * 生成的输出的字数/行数/字符数

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-10
    • 2017-07-26
    • 1970-01-01
    • 2018-12-01
    • 2017-01-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多