I am fairly new to running scripts in UNIX/Linux. I have a .env file containing environment information and a .sh script containing folder creations etc for that environment.
How would I run the script on the environment contained in the .env file or how could I point the script to the target environment?
Would it be as easy as:
bash 'scriptname.sh' 'filename.env'
set -a
beforehand? Otherwise, the environment variables wont be exported and the scriptscriptname.sh
will not have access to any of those. Why is this upvoted / what am I missing? – Mayfield