News for hackers. Stuff that matters.
Re:Useless Use of Cat Award by gizmo686 on Wednesday September 11, 2013 @10:57PM (#6371782)
This is not some magic behavior of pipelines. Rather, less (like many other terminal programs) is explicitly programmed to behave differently if the output is a terminal. Specifically, the less source code has this comment in it:

"/*

* Output is not a tty.

* Just copy the input file(s) to output.

*/"

grep does this to, which is why the color-coding control characters don't mess up other commands.

There are no comments on this comment yet.