Ok, so the ANSI color codes were directly in the log file...

The following sed does the job:

sed 's/\x1b\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g'

---

Andre Courchesne - Consultant

http://www.net-forces.com

MSN: [email protected]

Skype: VoipForces



L'information contenue dans le présent document est la propriété de Andre 
Courchesne. Et est divulguée en toute confidentialité. Cette information ne 
doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le 
consentement écrit explicite de Andre Courchesne.

The information contained in this document is confidential and property of 
Andre Courchesne. It shall not be used, disclosed to others or reproduced 
without the express written consent of Andre Courchesne.





On 2009-12-21, at 10:49 PM, Andre Courchesne wrote:

> I am running a script that parses log file using cat, grep, cut and I end-up 
> with ANSI shit like this:
> 
> 501?[0;37;40m
> 
> Where I should only have 501... I tried --color=never in grep, did not change 
> anything. 
> 
> When I cat a log file it colors it, anyone knows where I can disable this?
> 
> ---
> 
> Andre Courchesne - Consultant
> 
> http://www.net-forces.com
> 
> MSN: [email protected]
> 
> Skype: VoipForces
> 
> 
> 
> L'information contenue dans le présent document est la propriété de Andre 
> Courchesne. Et est divulguée en toute confidentialité. Cette information ne 
> doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le 
> consentement écrit explicite de Andre Courchesne.
> 
> The information contained in this document is confidential and property of 
> Andre Courchesne. It shall not be used, disclosed to others or reproduced 
> without the express written consent of Andre Courchesne.
> 
> 
> 
> 
> 
> _______________________________________________
> mlug mailing list
> [email protected]
> https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to