I'd like to create a script that adds some environmental variables from a file "variables" to /etc/environment
The file "variables" is of the form
My idea was to add the "variables" file to /etc/environmental
The problem with this approach is that if I I get
sudo sh -c "cat variables >> /etc/environment"
rather than the expected
However, if from the terminal I run then if I I get the expected result
How can I solve this issue?
I could manually change the "variables" file to
but the "variables" file might change in the future and is not me who creates it, so I need a more "automatic solution".
Any help would be much appreciated!