-1

What is the difference between these two commands:

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

How does the output differ?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
cyborg95
  • 185
  • 11
  • 1
    Have you tried the commands? Do a `man wc`. `wc` gives number of lines, number of words, number of letters. – Jotne Jan 31 '15 at 07:08

1 Answers1

1
wc `grep -l int *`

This will give you count of words/lines/characters for each file containing string "int".

grep -l int * | wc`

This will give you count of words/lines/characters of the output generated by grep -l int *

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278