Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # Read environment from config file
  2.  
  3. set -o allexport
  4. source my_config_file.conf
  5. set +o allexport
  6.  
  7. VAR1=eee
  8. VAR2="dsfsdf sd fsdf"
  9. VAR3=$VAR1
  10. # comment
  11.  
  12. oldPATH="$PATH"
  13. PATH=
  14. set -o allexport
  15. source /full-path-name/my_config_file.conf
  16. set +o allexport
  17. PATH="$oldPATH"
  18.  
  19. eval `awk -v FS="=["]*" -v RS="["]*n" '/^[A-Z0-9]+=/ { printf("export %s="%s"; ", $1, $2); }' my_config_file.conf`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement