On Mon, Jan 29, 2001 at 01:39:23AM +0100, William Leese wrote:
> Hi,
> 
> i'm trying to write a simple script that will do several things:
> 
> 1) merge 3 files in a predefined order
> 
> 2) replace a few words in one of the files to be merged, the values with 
> which the words will be replaced must be given(/requested).

Try this:

$perl -i.orig -pe 's/\bfoo\b/bar/g' *.[Cchy]

Rename all "foo" to "bar" in all files ending with C, c, h or y.
Backup-copies will be called *.orig


-- 
Thomas Guettler
Office: <[EMAIL PROTECTED]> www.interface-business.de
Private:<[EMAIL PROTECTED]>  http://yi.org/guettli

Reply via email to