help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

substitution in many files


From: Dave C
Subject: substitution in many files
Date: Tue, 18 Sep 2012 09:08:00 -0700 (PDT)

I want to use gnu make to make edits to many files.  In each file, I want to 
substitute the string:

./

to the string

${MPATH}

There could be several instances of this string on one line in the files.

I can do this in perl with:

perl -i -pe 's|\.\/|\${MPATH}\/|g'


but when I put this into a make target, I can not get the character escaping 
right.  The shell always ends up interpreting $MPATH as an empty variable.

Is there a good way to do this in gmake?

thanks,
dave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]