Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Useful to know is the exception is printed to stderr, not stdout. So if you continue the pipe after head you still get expected results.

cat doesn't die 100% silently either, check $PIPESTATUS after piping cat into shorter head and you will see its exit code is non zero.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: