I am on Mac OS X and use sed to replace in place.
Essentially, I have this:
PREFIX="$1"
sed -i bak -e 's|OCAMLDIR|"${PREFIX}"|g' ocamloptrev
Where PREFIXis the way, so I use |.
Unfortunately, the variable in the file path does not get an estimate, as I expected, in the end I get:
OCAMLC="${PREFIX}"/bin/ocamlopt
How can I get the correct score ${PREFIX}in the team sed?
source
share