-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
I just
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 's/http\:\/\/www\.domain\.htm\///g' *.htm
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:
lia href=http://www.domain.com/tales/wouf.html
To this:
lia href=tales/wouf.html
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 ':'
___
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 thusly...
On Saturday 23 December 2006
Jack Stone wrote:
Appreciate a tip on how to search replace hundreds of *.htm files:
From this:
lia href=http://www.domain.com/tales/wouf.html
To this:
lia href=tales/wouf.html
In other words, I just want the relative path and remove all the extra:
http://www.domain.htm/ portions of the
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],
wrote Josh Paetzel thusly...
On Saturday
---BeginMessage---
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], freebsd-questions@freebsd.org
Subject: Re: Search Replace Issue
Date: Sun, 24 Dec 2006
From this:
lia href=http://www.domain.com/tales/wouf.html
To this:
lia href=tales/wouf.html
In other words, I just want the relative path and remove all
the extra: http://www.domain.htm/ portions of the lines.
...
cat file.html | sed -e s|http://www.domain.com||g file.tmp.html
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
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
On Saturday 23 December 2006 21:29, Jack Stone wrote:
Appreciate a tip on how to search replace hundreds of *.htm
files:
From this:
lia href=http://www.domain.com/tales/wouf.html
To this:
lia href=tales/wouf.html
In other words, I just want the relative path and remove all the
extra:
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 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:
lia href=http://www.domain.com/tales/wouf.html
To this:
lia href=tales/wouf.html
In other words, I just want the relative path and
14 matches
Mail list logo