In a shell script, what is the difference between the following?
export $(cat .env)
and
source .env
where .env
is the name of a file with a key=value specified on each line. I'm not insterested in performance/speed benchmarks, only actual functionality/features. For context, I'm trying to make use of a docker-compose env file in supporting scripts.