The coloured output is really helpful, but in some situations it makes it difficult to integrate the tool in scripts.. for example we run this during instance startup in AWS:
sensu-cli client history $(facter fqdn) | grep last_status | \
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | awk '{print $2}' | egrep '(1|2|3)'
That nasty sed is there to parse the coloured output ASCII codes, otherwise we can't properly grep for last_status codes
Is there a simpler way to do this within the shell output?
Alternatively, would you consider adding an option which allows --nocolour ?
The coloured output is really helpful, but in some situations it makes it difficult to integrate the tool in scripts.. for example we run this during instance startup in AWS:
That nasty sed is there to parse the coloured output ASCII codes, otherwise we can't properly grep for
last_statuscodesIs there a simpler way to do this within the shell output?
Alternatively, would you consider adding an option which allows
--nocolour?