I have an app which runs and reads a text configuration file. This points to several locations of configurations / outputs etc.
Is it possible to use environmental variables inside the text configuration file, rather than hardcoded paths?
LogFilePath=$LOG_FILE_PATH vs LogFilePath=/home/user/logs
When running, the application fails as it cannot expand the Environment Variable. It will be sourced inside the shell before the application is run.
Thanks!
LOG_FILE_PATHis declared before that line in the config file. There could be something like delayed expansion, too. But I'm not aware of it and it would depend on your exact shell, which you haven't stated.