You are not logged in.

#1 2009-12-20 20:04:08

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Batch file editing in the command line

I have a large number of files that need to be edited. Only one line in each needs to be changed and its the same line in each file. I am new to bash scripting a could use a little help.

How can I change this line from "prefix=/devel/target" to "prefix=/home/usr/devel"?

Thanks.

Offline

#2 2009-12-20 20:06:32

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Batch file editing in the command line

sed. Search the web for 'sed find and replace' and the first hit should give you full examples.

Offline

#3 2009-12-20 21:56:22

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Re: Batch file editing in the command line

ok thanks.

Offline

Board footer

Powered by FluxBB