0

I need set more than 100 environment variable from file.txt .this variable in text file is same below:

env=BACKTORY_AUTHENTICATION_MASTER_KEY=058f04d8ea6545sdf65sde99e49
env=BACKTORY_AUTHENTICATION_CLIENT_KEY=5a3ba2f0e4b0a24sdfsd4ffb4
env=BACKTORY_MASTER_ACCESS_TOKEN=my_token
.
.
.

is any way to set this variable automatically ? and second question is : one time i set this variable manually by this way export variable = value one by one! but now i cant see any of them when i use printenv. is after restarting Ubuntu every environment variable will deleting? thanks.

mehdi
  • 1,100
  • 1
  • 11
  • 27
  • Does the format *have* to be like that? If you make it an actual script you could `source` it. – jonrsharpe May 27 '19 at 16:57
  • This post may help https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-pair-values – Hyphen May 27 '19 at 17:03
  • @Hyphen : Thank you but my second problem still exist . what happen to past environment variable that i set? – mehdi May 27 '19 at 17:09

0 Answers0