Re: Search Replace Issue

2006-12-26 Thread Garrett Cooper
-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

RE: OT: sed usage (was Re: Search Replace Issue)

2006-12-25 Thread Jack Stone
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

Re: Search Replace Issue

2006-12-24 Thread Parv
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

Re: Search Replace Issue

2006-12-24 Thread DeepTech
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 ':' ___

Re: Search Replace Issue

2006-12-24 Thread Jack Stone
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

Re: Search Replace Issue

2006-12-24 Thread Garrett Cooper
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

Re: Search Replace Issue

2006-12-24 Thread Garrett Cooper
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

[Fwd: Re: Search Replace Issue]

2006-12-24 Thread Mike Jeays
---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

Re: Search Replace Issue

2006-12-24 Thread perryh
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

Re: Search Replace Issue

2006-12-24 Thread Parv
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

OT: sed usage (was Re: Search Replace Issue)

2006-12-24 Thread Parv
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

Re: Search Replace Issue

2006-12-23 Thread Josh Paetzel
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:

Re: Search Replace Issue

2006-12-23 Thread DeepTech
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]

Re: Search Replace Issue

2006-12-23 Thread Randy Pratt
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