I need to export a lot of variables like export x1=1 export x2=2
I moved all variables in file .env and tried
source .env
After it I executed
printenv
and all of this variables were absent in the list of env variables.
Also I tried
export $(xargs <.env)
But I have commented lines in .env file and I got following messages
#': not a valid identifier
So how can I export variables from file and skip commented lines?