here is an explanation of why you get the error with the head, but not with the tail:
head -1 should read only one line of its input. then he will come out, and the tee will continue to give his way out to ...
tail -1, on the other hand, must read the full input to complete its task, so that it will never shut down the pipe before tee completes.
you can safely ignore a pipe break message, and many programs stop reporting errors. I donโt see it on my car.
user829755
source share