From time to time one need to do some Bash scripting. Lately I’ve come back to this while writing a Docker entrypoint for a new service we’re launching.
Docker entrypoint scripts are usualy where you try to mangle together some environment variables into other environment variables to make use of in the application.
Today I learned how to dynamicaly create a variable and then use it to fetch a value from existing (environment) variable.
The whole magic (and something new for me) is this: