0

I have special characters in the content of $VALUE which I would to add in file ($FILE).

When I do :

sed -i 's|T_VALUE|$VALUE|g' "$FILE"

my file contains the literal string $VALUE instead of the content of the variable $VALUE.

AdminBee
  • 21,637
  • 21
  • 47
  • 71
akaliza
  • 101
  • 1
  • See [is-it-possible-to-escape-regex-metacharacters-reliably-with-sed](https://stackoverflow.com/questions/29613304/is-it-possible-to-escape-regex-metacharacters-reliably-with-sed). – Ed Morton Mar 15 '23 at 11:23

0 Answers0