SOLVED Re: [SLE] [OT SCRIPT SED] How can I use sed to replace /usr with shared?
Never mind I figured it out (Anders also got it right, after I solved it) : had to do sed -e and put the comands in quotes: sed -e "s/\/usr\ /shared\ /g" suse7.1_config_options.jw At 03:54 PM 4/19/2001 -0500, you wrote:
Hey y'all,
I want to replace every instance of "/usr " with "shared " (note the space at the end, no quotes of course) but sed s//usr /shared /g fails because of the second slash. I can't excape it with \ either. How do I get around that?
---------------------------------------------------- Jonathan Wilson System Administrator
Cedar Creek Software http://www.cedarcreeksoftware.com Central Texas IT http://www.centraltexasit.com
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
---------------------------------------------------- Jonathan Wilson System Administrator Cedar Creek Software http://www.cedarcreeksoftware.com Central Texas IT http://www.centraltexasit.com
Today, Jonathan Wilson smoke something and in the trip wrote...
Never mind I figured it out (Anders also got it right, after I solved it) : had to do sed -e and put the comands in quotes: sed -e "s/\/usr\ /shared\ /g" suse7.1_config_options.jw
Hi, you could do also: sed "s./usr .shared .g" you can use any character as parameter divisor, and between this character you choose, if you need to use it on the pattern, you escape it. Abracos, Adilson
participants (2)
-
Adilson Guilherme Vasconcelos Ribeiro
-
wilson@claborn.net