Is there any benefit of
cat files* | grep pattern
over this grep -h pattern files*
aside from result color highlighting? cat files* | grep pattern
over this grep -h pattern files*
aside from result color highlighting?Consider a pipeline like
cat *.log | grep "apache" | grep -v "1.1.1.1" | wc -l
It makes sense in that order. Read the file, grep this, exclude that, could the total. Meanwhile grep "apache" *.log | grep -v "1.1.1.1" | wc -l
may be a few characters shorter but the order isn't really logical anymore.https://stackoverflow.com/questions/13507889/difference-betw...