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

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 '

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 pa

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

Re: Search & Replace Issue

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

[Fwd: Re: Search & Replace Issue]

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

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]>

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: 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.

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

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 ':' ___ fre

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: > > > > http://www.domain.com/tales/wouf.html > > To this: > > http://www.domain.com!!

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: > http://www.domain.com/tales/wouf.html > To this: > http://www.domain.htm/ portions of the lines. Probably many ways to do this but

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 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: > > 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

Search & Replace Issue

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