Hacker News new | past | comments | ask | show | jobs | submit login

I really like the idea of alternating the color of lines of output, although I might use something a bit less bold. Is there an easy way to have command piped through this in bash?



one problem of the 'alias yourcmd to yourcmd | colorize' is dealing with preserving the return code from the actual command, rather than the last in the pipeline.

It can be done with things liek $PIPESTATUS, but some sort of wrapper/function to do it would be nice.




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

Search: