I’ve been looking up some bash stuff today and a few snippets I’ve tried have included > > which seems to be the cause of the errors I’m receiving.
command 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
Here’s what I’m working with.
$ bash --help
GNU bash, version 3.2.48(1)-release-(x86_64-apple-darwin12)
EDIT
Here are the errors I’m gettting:
file.sh: line 14: syntax error near unexpected token `>'
file.sh: line 14: `command 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)'
According to the answers to this question, Bash 3.2.48 for Mac OS X has some limitations when it comes to process-substitution; it supports it in some cases but not others. Your case is apparently one where it doesn’t.
Quoting from the best/most-helpful answer there: