Set environment variables from file of key/pair values (like .env)

White spaces in the value


source <(sed -e /^$/d -e /^#/d -e 's/.*/declare -x "&"/g' .env)


#!/bin/bash
env $(cat “$1” | grep -v “#” | xargs) ${@:2}