-1

I'm using a build based on python. I can define python functions like

do_install () { ... }

I can run bash commands within these functions, like

do_install () {
      sed '' ...
}

I am running a sed command in one of these functions

 sed -ri 's/PREFIX=/PREFIX=.../'

Within the quotes I need to use a global python variable, say. ${VARIABLE}, like

sed -ri 's/PREFIX/PREFIX=${VARIABLE}/'

How do I quote the variable to be identified as a python global variable. I tried a number of things including, using different string quoting in sed

Thanks in advance.

Vigneshwaren
  • 1,103
  • 2
  • 11
  • 22

1 Answers1

1

Use double quotes " instead of simple.

By the way the code that you are posting is a simple bash script it has nothing of python.

Francisco Puga
  • 20,593
  • 4
  • 43
  • 56