-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Parv wrote:
> in message <[EMAIL PROTECTED]>,
> wrote Garrett Cooper thusly...
>> cat file.html | sed -e "s|http://www.domain.com||g"
> ...
>
> Not really a need for cat(1), just use input redirection ...
>
> sed -e '...' < file
>
>
> - Parv
From: Parv <[EMAIL PROTECTED]>
To: DeepTech <[EMAIL PROTECTED]>
CC: freebsd-questions@freebsd.org
Subject: OT: sed usage (was Re: Search & Replace Issue)
Date: Mon, 25 Dec 2006 00:04:47 -0500
in message <[EMAIL PROTECTED]>,
wrote DeepTech thusly...
>
> sed -e '
in message <[EMAIL PROTECTED]>,
wrote DeepTech thusly...
>
> sed -e 's/http\:\/\/www\.domain\.htm\///g' *.htm > *.htm
That will most likely destroy the original file(s).
Depending on your shell, you will get redirection error from the shell
if there happen to be more than one file matching the pa
in message <[EMAIL PROTECTED]>,
wrote Garrett Cooper thusly...
> cat file.html | sed -e "s|http://www.domain.com||g"
...
Not really a need for cat(1), just use input redirection ...
sed -e '...' < file
- Parv
--
___
freebsd-questions@freebsd.org
> >> From this:
> > http://www.domain.com/tales/wouf.html
> > To this:
> > http://www.domain.htm/ portions of the lines.
...
> cat file.html | sed -e "s|http://www.domain.com||g" > file.tmp.html &&
> mv file.tmp.html file.html
I don't think the "cat" accomplishes anything in a case like this
(an
--- Begin Message ---
On Sun, 2006-12-24 at 12:13 -0800, Garrett Cooper wrote:
> Jack Stone wrote:
> >
> >
> >
> >> From: Parv <[EMAIL PROTECTED]>
> >> To: Josh Paetzel <[EMAIL PROTECTED]>
> >> CC: Jack Stone <[EMAIL PROTECTED]>
Jack Stone wrote:
From: Parv <[EMAIL PROTECTED]>
To: Josh Paetzel <[EMAIL PROTECTED]>
CC: Jack Stone <[EMAIL PROTECTED]>, freebsd-questions@freebsd.org
Subject: Re: Search & Replace Issue
Date: Sun, 24 Dec 2006 02:56:32 -0500
in message <[EMAIL PROTECTED]>
Jack Stone wrote:
Appreciate a tip on how to search & replace hundreds of *.htm files:
From this:
http://www.domain.com/tales/wouf.html
To this:
http://www.domain.htm/ portions of the lines.
Large thanks in advance for help.
Happy Holidays!
Jack
cat file.html | sed -e "s|http://www.domain.
From: Parv <[EMAIL PROTECTED]>
To: Josh Paetzel <[EMAIL PROTECTED]>
CC: Jack Stone <[EMAIL PROTECTED]>, freebsd-questions@freebsd.org
Subject: Re: Search & Replace Issue
Date: Sun, 24 Dec 2006 02:56:32 -0500
in message <[EMAIL PROTECTED]>,
wrote Josh Paetzel
OK, specifically,
sed -e 's/http\:\/\/www\.domain\.htm\///g' *.htm > *.htm
The sed command processes files with some regexp stuff,
this command removes the http://www.domain.htm/ from htms.
NOTE: not sure if u have to use a '\' before that ':'
___
fre
in message <[EMAIL PROTECTED]>,
wrote Josh Paetzel thusly...
>
> On Saturday 23 December 2006 21:29, Jack Stone wrote:
> > Appreciate a tip on how to search & replace hundreds of *.htm
> > files:
> > >From this:
> >
> > http://www.domain.com/tales/wouf.html
> > To this:
> > http://www.domain.com!!
On Sat, 23 Dec 2006 21:29:40 -0600
"Jack Stone" <[EMAIL PROTECTED]> wrote:
> Appreciate a tip on how to search & replace hundreds of *.htm files:
>
> >From this:
> http://www.domain.com/tales/wouf.html
> To this:
> http://www.domain.htm/ portions of the lines.
Probably many ways to do this but
Don't know anything concrete, but: regexp or wildcards.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
On Saturday 23 December 2006 21:29, Jack Stone wrote:
> Appreciate a tip on how to search & replace hundreds of *.htm
files:
> >From this:
>
> http://www.domain.com/tales/wouf.html
> To this:
> http://www.domain.htm/ portions of the lines.
>
> Large thanks in advance for help.
>
> Happy Holidays
Appreciate a tip on how to search & replace hundreds of *.htm files:
From this:
http://www.domain.com/tales/wouf.html
To this:
http://www.domain.htm/ portions of the lines.
Large thanks in advance for help.
Happy Holidays!
Jack
__
15 matches
Mail list logo