Advertisement

08.25.2006 at 05:01AM PDT, ID: 21967275
[x]
Attachment Details

Sed in place editing

Asked by dcotruta in FreeBSD

Tags: , ,

Is it possible to use sed with a script (i.e. the -f switch) and still have it edit the target file(s) in-place (i.e the -i switch). If so, what is the correct order of the switches?

I tried this:

sed -f sedscript -i home.htm
sed: -i may not be used with stdin

Any ideas?Start Free Trial
[+][-]08.25.2006 at 03:32PM PDT, ID: 17393311

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.

 
[+][-]08.25.2006 at 03:37PM PDT, ID: 17393336

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

Zone: FreeBSD
Tags: sed, place, edit
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.25.2006 at 03:48PM PDT, ID: 17393399

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.

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