Advertisement

06.21.2000 at 04:39PM PDT, ID: 10515858
[x]
Attachment Details

Replace a string in several text files

Asked by dong in Linux, Server Side Includes (SSI), Linux Distributions

Tags: replace, linux, text, string, files

I want to replace a string with another string in several text files. I tried the following command which I read from a Linux book, but it doesn't work. Can anyone give me some help?

[Linux]#find ./ -type f -exec sed 's/string1/string2' {} \;
Start Free Trial
[+][-]06.21.2000 at 09:04PM PDT, ID: 3037295

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Server Side Includes (SSI), Linux Distributions
Tags: replace, linux, text, string, files
Sign Up Now!
Solution Provided By: markt9
Participating Experts: 5
Solution Grade: B
 
 
[+][-]06.21.2000 at 09:17PM PDT, ID: 3037395

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2000 at 10:02PM PDT, ID: 3037812

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.16.2003 at 06:01AM PDT, ID: 8340561

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2003 at 09:49AM PST, ID: 9643890

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2004 at 05:33PM PDT, ID: 11135770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2004 at 06:36AM PDT, ID: 11137542

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.26.2005 at 09:01PM PDT, ID: 14533558

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32