Help on cleaning strings
Hi,
Sorry for the newbie question, but I've searche over the web and couldn=
'
find an answer to what I need.
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.
Can someone help me, please ?
Any help would be appreciated.
Warm Regards,
--
:wq! M=E1rio Gamito
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help on cleaning strings
Words by M=E1rio Gamito [Wed, Aug 22, 2007 at 08:07:56PM +0100]:
> Hi,
>
> Sorry for the newbie question, but I've searche over the web and cou=
ldn' find an answer to what I need.
>
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.
>
> Can someone help me, please ?
>
Yes.
cd dir
for i in *.html;do vi +%s,##Z/,,g +x $i; done
--
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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help on cleaning strings
perl -p -i.bak -e 's{##Z\/}{}g' *.html
On Wed, 2007-08-22 at 20:07 +0100, M=C3=A1rio Gamito wrote:
> Hi,
>
> Sorry for the newbie question, but I've searche over the web and coul=
dn'
> find an answer to what I need.
>
> 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.
>
> Can someone help me, please ?
>
> Any help would be appreciated.
>
> Warm Regards,
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help on cleaning strings
Words by M=E1rio Gamito [Wed, Aug 22, 2007 at 08:07:56PM +0100]:
> Hi,
>
> Sorry for the newbie question, but I've searche over the web and cou=
ldn' find an answer to what I need.
>
> 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.
>
> Can someone help me, please ?
>
> Any help would be appreciated.
>
sed -i.bak -e 's,##Z/,,g' *.html
--
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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help on cleaning strings
: 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 ...
<NEXT LINE STARTS CODE>
#!/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
<PREVIOUS LINE ENDS CODE>
--
=2E.. 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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html