Some notes:
- The ".env" file should have an "LF" end-of-line sequence.
- Avoid using dynamic values in environment variables, such as
variable1=$variable2@$variable3
- Avoid using a quotation (
"
) in environment variables vavlue, such asvariable="value"
This is the best and shortest answer
source .env && export $(cut -d= -f1 < .env)