difference between grep Vs cat and grep

后端 未结 5 1000
再見小時候
再見小時候 2020-12-29 05:53

i would like to know difference between below 2 commands, I understand that 2) should be use but i want to know the exact sequence that happens in 1) and 2) suppose filename

5条回答
  •  心在旅途
    2020-12-29 06:47

    Functionally they are equivalent, however, the shell will fork two processes for cat filename | grep regex and connect them with a pipe.

提交回复
热议问题