On 9 Kwi, 20:36, spce...@[EMAIL PROTECTED]
(John DuBois) wrote:
> In article
<e7342bbc-7909-474f-ae75-18c0b2724...@[EMAIL PROTECTED]
>,
>
> tomekl =A0<to...@[EMAIL PROTECTED]
> wrote:
> >I need to replace html codes with ascii chars, so for
>
> >'IJaaaaK'
>
> >output should be:
>
> >'IJaaaaK'
>
> The following is inefficient, but should give you an idea of a general
app=
roach
> you could use to carry out this transformation. =A0It only deals with
nume=
ric
> code character entities, as in your example text.
>
> echo "IJaaaaK" | gawk '
> {
> =A0 =A0 while (match($0,/&#[0-9]+;/))
> =A0 =A0 =A0 =A0 $0 =3D substr($0, 1, RSTART-1) sprintf("%c", substr($0,
RS=
TART+2)+0) \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 substr($0, RSTART+RLENGTH)
> =A0 =A0 print
>
> }'
>
> =A0 =A0 =A0 =A0 John
> --
> John DuBois =A0spce...@[EMAIL PROTECTED]
=A0KC6QKZ/AE
=A0http://www.armory.com/~s=
pcecdt/
Brilliant! Thank you !!!


|