Help on cleaning strings

Help on cleaning strings

am 22.08.2007 21:07:56 von gamito

Hi,

Sorry for the newbie question, but I've searche over the web and couldn=
'=20
find an answer to what I need.

I need to clean all the ocorrences of the "##Z/" string (without the=20
quotes), from a series of .html files located in a single directory.

Can someone help me, please ?

Any help would be appreciated.

Warm Regards,
--=20
:wq! M=E1rio Gamito
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Help on cleaning strings

am 22.08.2007 21:18:21 von Jose Celestino

Words by M=E1rio Gamito [Wed, Aug 22, 2007 at 08:07:56PM +0100]:
> Hi,
>=20
> Sorry for the newbie question, but I've searche over the web and cou=
ldn' find an answer to what I need.
>=20

Not nearly hard enough.

> I need to clean all the ocorrences of the "##Z/" string (without the=
quotes), from a series of .html files located in a single directory.
>=20
> Can someone help me, please ?
>=20

Yes.

cd dir
for i in *.html;do vi +%s,##Z/,,g +x $i; done

--=20
Jose Celestino
------------------------------------------------------------ ----
http://www.msversus.org/ ; http://techp.org/petition/show/1
http://www.vinc17.org/noswpat.en.html
------------------------------------------------------------ ----
"And on the trillionth day, Man created Gods." -- Thomas D. Pate
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Help on cleaning strings

am 22.08.2007 21:42:40 von Axl Purushu

perl -p -i.bak -e 's{##Z\/}{}g' *.html

On Wed, 2007-08-22 at 20:07 +0100, Mário Gamito wrote:
> Hi,
>=20
> Sorry for the newbie question, but I've searche over the web and coul=
dn'=20
> find an answer to what I need.
>=20
> I need to clean all the ocorrences of the "##Z/" string (without the=20
> quotes), from a series of .html files located in a single directory.
>=20
> Can someone help me, please ?
>=20
> Any help would be appreciated.
>=20
> Warm Regards,

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Help on cleaning strings

am 22.08.2007 21:51:01 von Jose Celestino

Words by M=E1rio Gamito [Wed, Aug 22, 2007 at 08:07:56PM +0100]:
> Hi,
>=20
> Sorry for the newbie question, but I've searche over the web and cou=
ldn' find an answer to what I need.
>=20
> I need to clean all the ocorrences of the "##Z/" string (without the=
quotes), from a series of .html files located in a single directory.
>=20
> Can someone help me, please ?
>=20
> Any help would be appreciated.
>=20

sed -i.bak -e 's,##Z/,,g' *.html

--=20
Jose Celestino
------------------------------------------------------------ ----
http://www.msversus.org/ ; http://techp.org/petition/show/1
http://www.vinc17.org/noswpat.en.html
------------------------------------------------------------ ----
"And on the trillionth day, Man created Gods." -- Thomas D. Pate
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Help on cleaning strings

am 23.08.2007 10:05:41 von terry white

: M=E1rio Gamito [Wed, Aug 22, 2007 at 08:07:56PM +0100]:

: Sorry for the newbie question

why. if nothing else, that the reason for this list.


the following script should work ...



#!/bin/sh

# create vanilla list of *.html to process
for F in `dir -1 --color=3Dnever *.html` ;

# make backup
do mv $F $F.save

# pipe it into the string editor
cat $F.save | sed s/\#\#Z\// > $F ;
done
exit



--=20
.. i'm a man, but i can change,
if i have to , i guess ...

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html