I have a config file which contains the path to another file which needs to be opened. This file path references the Linux username:
/root/${USER}/workspace/myfile.txt
where $USER should be translated to the Linux username.
This doesn't work and because the string is stored in my config file, I cannot use getenv()
.
Is there another way to achieve this?