Re: a SED need

2005-12-27 Thread Dmitry Sidorov
On Tue, 2005-12-27 at 09:18 -0600, Jack Stone wrote:
 I have some HTML files with hundreds of URLs that I need to modify using a 
 search/replace string. I assume that SED(1) is the right tool to use, but 
 every syntax I've tried has not worked.
 
 Here is what I'm trying to do:
 Change full URLs to relative paths, in other words, chop off the
 http://www.example.com/; portion:
 
 From this:
 lia href=http://www.example.com/model/many.html;
 To this:
 lia href=model/many.html
 
 I think it is the slashes and quotes that are giving me fits as I'm very 
 much a novice on SED(1) syntax.
 
 Would appreciate any tips on how to do the above so I can search and replace 
 all of the hundreds of URLs.
 
 Many thanks and Happy New Year!
 
 Regards,
 Jack
 
 _
 Dont just search. Find. Check out the new MSN Search! 
 http://search.msn.click-url.com/go/onm00200636ave/direct/01/
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

Try this:
sed s/http:\\/\\/www.example.com// your_file

-- 
Dmitry Sidorov
PEM QA Engineer
SWsoft, Inc.
E-mail: [EMAIL PROTECTED]
ICQ UIN: 864582

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pkg_delete question

2005-12-27 Thread Dmitry Sidorov
On Wed, 2005-12-28 at 13:55 +0800, Yuan Jue wrote:
 hello, all
 
 I wanna delete a package that I don't want now. I know that when I use 
 portinstall -R xxx to install it, many dependencies have been installed too.
 Now I wanna delete them all if they are not used by any other packages.
 
 how can I do it? can I pkg_delete -r xxx?
 
 thanks.
 
yes you can,
ls -al /var/db/pkg
find your package name, and execute:
pkg_delete -r package_name

-- 
Dmitry Sidorov
PEM QA Engineer
SWsoft, Inc.
E-mail: [EMAIL PROTECTED]
ICQ UIN: 864582

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]