[SunHELP] removing patterns with control codes, ie colors
Fri Jan 24 11:15:37 CST 2003
I was able to do it with
show db | col -b | sed s/[0-7]m//g
I'm sure theres a better way but
this works. Thanks Patrick.
-----Original Message-----
From: Patrick Whelan [mailto:consultant0610 at hotmail.com]
Sent: Friday, January 24, 2003 9:34 AM
To: RMarkham at hafeleamericas.com
Subject: Re: [SunHELP] removing patterns with control codes, ie colors
Have you tried piping it through col with perhaps the -b option? Or maybe
some other option.
= = = Original message = = =
I have output from a program that contains embedded ctrl codes for colors. I
am having trouble stripping these codes so as to have a plain text output
for transmission to my mobile cell. Example: using ctrl-v ctrl-[ [ 7m and
ctrl-v ctrl-[ [ 0m appears as ^[7m AVAILABLE ^[0m on other devices other
than the terminal It is basically printing the word avaiable using white on
black colors. I tried sed s/^[[.m//g to remove all codes at once but sed
complains the command is garbled. It will also complain if I dont use the
regexp "." Thanks for assistance in advance.
_______________________________________________
SunHELP maillist - SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp
___________________________________________________________
Sent by ePrompter, the premier email notification software. Free download at
http://www.ePrompter.com.
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the SunHELP
mailing list