regex - Using $1 in regexp within a Makefile -


this question has answer here:

i try replace following perl command:

perl -c -p -i -e 's/([\?\.\!])\n/$1 /g' html/數14.html 

the result fine when call command line. when call within makefile doesn't work. apparently $1 interpreted shell variable.

in makefile looks this:

數14.html: 數14.adoc 40_2064_im\ strand-appartment.adoc 41_2064_ein\ plan.adoc  42_1915_in\ einer\ suppenküche.adoc      asciidoctor -d html parts/數14.adoc       perl -c -p -i -e 's/([\?\.\!])\n/$1 /g' html/數14.html 

how can have normal regexp behaviour here?

makefiles interpret $ sequences before executing commands, disregarding quoting. in order escape $ in makefile, write $$ - result in single $ in command.


Comments

Popular posts from this blog

Lists in Python -

android - can not access to progress bar in an other activity -

html - Not able to access next element of an array javascript -