Hi all,
I have the following lines
<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
and I would like to get
A gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
B gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
J gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
I'd like to get the <b> in the front and all this </b><font color='#06C'> deleted.
Thanks
$
$ cat f1
<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
$
$ perl -lne "s&<b>|</b><font color='#06C'>&&g; print" f1
A gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
B gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
J gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
$
$
tyler_durden
thanks for the reply tyler_durden.
Do you or anyone else know a SED sollution to my problem?
Well it ain't much different than the Perl solution:
$
$ cat f1
<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
$
$ sed "s/<b>\|<\/b><font color='#06C'>//g" f1
A gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
B gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
J gtwrhwrthwr text hghthwrhtwrtw ; text text (text)
$
$
tyler_durden
Thanks mate working perfect
echo "<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)" | sed 's/<[^>]*>//g'