M
Mark Hobley
I am using perl as a find and replace tool. I want to replace the following
text with a null:
$(srcdir)/config/override.m4
I tried the following:
find ./ -name Makefile.in -exec perl -pi -e \
"s/\$\(top_srcdir\)\/\.\.\/config\/override\.m4//g;" {} \;
Unfortunately, this gives an error:
Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE top_srcdir\)/\.\./ \
config/override\.m4/ at -e line 1, <> line 1.
I guess that the brackets are being evaluated first, and being treated as part
of the expression.
How do I represent literal brackets within the expression?
Mark.
text with a null:
$(srcdir)/config/override.m4
I tried the following:
find ./ -name Makefile.in -exec perl -pi -e \
"s/\$\(top_srcdir\)\/\.\.\/config\/override\.m4//g;" {} \;
Unfortunately, this gives an error:
Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE top_srcdir\)/\.\./ \
config/override\.m4/ at -e line 1, <> line 1.
I guess that the brackets are being evaluated first, and being treated as part
of the expression.
How do I represent literal brackets within the expression?
Mark.