Bash

Export all variables in a file

$ set -a; source <file>; set +a