#TIL - envsubst command
I was doing some bashscript work to generate yaml files from simple templates to be able to use in GitLab CI jobs. First thing that I did was using sed
command and replaced variables in yml like this:
This works but when you add more variables and especially if values includes some chars that breaks regex rule, then it's not helpful anymore.
Then I found awesome envsubst
command in a stackoverflow thread.
This is so much cleaner! I loved it!