D
D. Alvarado
Hello, I have a certain string that appears repeatedly in my code
style="background-image:url("/path/to/an/image");"
I would like to replace all instances with
style="background-image:url('/path/to/an/image');"
where "/path/to/an/image" is not always necessarily the same for each
instance. I learned this great command line search and replace
method:
perl -pi -e 's/expr/replacement/g' *.html
but when I try
I get the error:
-bash: syntax error near unexpected token `)'
Can anyone help? Thanks, - Dave
style="background-image:url("/path/to/an/image");"
I would like to replace all instances with
style="background-image:url('/path/to/an/image');"
where "/path/to/an/image" is not always necessarily the same for each
instance. I learned this great command line search and replace
method:
perl -pi -e 's/expr/replacement/g' *.html
but when I try
perl -pi -e 's/background-image:url\(\"(.*?)\"\);/background-image:url(\'$1\');/g" *.html
I get the error:
-bash: syntax error near unexpected token `)'
Can anyone help? Thanks, - Dave