Hands-on task
Turn config keys into variable names
In /etc/app.env the keys are lowercase with hyphens (db-host=pg-1.local). Convert the key names to environment variable format: uppercase letters and underscores instead of hyphens (DB_HOST=pg-1.local). The values to the right of = must not be touched — neither their case nor their hyphens.
- sed
- \U case conversion
- capture groups
- ta/:label loop
- in-place -i