-
Notifications
You must be signed in to change notification settings - Fork 2
sys.env
TurtleKitty edited this page May 18, 2019
·
2 revisions
The interface to the operating system environment.
sys.env.uname
; ("Linux" "turtlekitty" "4.17.6_1"
; "#1 SMP PREEMPT Sat Jul 14 12:59:18 UTC 2018" "x86_64")
sys.env.hostname ; "turtlekitty"
(sys.env.get "SHELL") ; "/bin/bash" ; get accepts a text
(sys.env.get 'SHELL) ; "/bin/bash" ; or a symbol for the key
(sys.env.set! 'FOO "23") ; "23" ; values must be a text
(sys.env.get 'FOO) ; "23"
(sys.env.del! 'FOO) ; null
(sys.env.get 'FOO) ; null