Can command_b knows that command_c is following?
command_a | command_b | command_c
No. Each program is just reading standard input and writing to standard output.
As the other answerers said, no, command_b cannot (need not, should not) know that command_c follows. I'm adding another answer because here is a little additional information:
command_b might omit ASCII color codes, while command_c might colorize its output).See also: