0

I am sitting with a bash script that does this

DOLLAR=$ envsubst < "in.conf" > "out.conf"

where I see these DOLLAR's in the in.conf file

proxy_set_header            Host ${DOLLAR}host;

in out.conf have it become

proxy_set_header            Host $host;

Question

envsubst does search and replace of environment variables, but what is the purpose of DOLLAR=$?

Jasmine Lognnes
  • 6,597
  • 9
  • 38
  • 58
  • 2
    Related: [is there an escape character for envsubst?](http://stackoverflow.com/q/24963705/1983854) – fedorqui Aug 18 '16 at 14:52
  • 1
    It is the same as the purpose of `A=foo`. It assigns the string on the right hand side of the `=` to the variable named on the LHS. That is, the variable `DOLLAR` gets assigned the string `$`. – William Pursell Aug 18 '16 at 14:54

0 Answers0