-2

I saw an example where some one did this:

cat source.txt | grep a

But I always do it like:

grep a source.txt

What's the difference between the two?

user2030677
  • 3,448
  • 4
  • 23
  • 36

1 Answers1

1

The first one is a classical “useless use of cat” (UUOC).

lxg
  • 12,375
  • 12
  • 51
  • 73