Here's a one-liner for getting one variable:
MY_VAR=$(grep MY_VAR .env | cut -d '=' -f2)
One issue i see with all these solutions is: what happens if i have two similar variables. I need to fix the Grep part to only match
Also... i would never have thought about using grep here, so Thank You.