a8m / envsubst

Environment variables substitution for Go
MIT License
747 stars 83 forks source link

Escaping syntax #15

Closed strowi closed 5 years ago

strowi commented 5 years ago

Hi,

nice little helper tool;) Although i recently stumbled over a problem i couldn't find a solution to.. How can i escape sth. like this:

A=${static}

I know about $${static} -> $static. But what if i need the {} ?

regards, Roman

a8m commented 5 years ago

Hey @strowi, thanks for opening this issue. All you need to do is to add a $ before the expression. For example:

$ echo 'hello $${HOME}' | envsubst

hello ${HOME}

I'm going to close this issue since it works as expected. But, feel free to open it if you have any trouble with it.