in reply to Capturing ANSI color escape codes with backticks

Backticks do capture the raw output, but on most systems grep is configured to omit the ANSI color codes when it writes to a pipe (and not to a terminal) via the option --color=auto.

You check by simply writing

$ echo foo | grep foo # output in read on my terminal foo $ echo foo | grep foo | cat # output in grey on my terminal foo

Use --color=always to force color codes.

Perl 6 - links to (nearly) everything that is Perl 6.