-
Notifications
You must be signed in to change notification settings - Fork 4
sys.env
Turtle Kitty edited this page Jan 28, 2016
·
2 revisions
The interface to the operating system environment.
sys.env.uname
-> ("Linux" "turtlekitty" "4.2.6_1" "#1 SMP PREEMPT Tue Nov 10 07:19:29 UTC 2015" "x86_64")
sys.env.hostname
-> "turtlekitty"
(sys.env.get "SHELL") ; get accepts a text
-> "/bin/bash"
(sys.env.get 'SHELL) ; or a symbol
-> "/bin/bash"
(sys.env.set! 'FOO "23") ; values must be texts
-> "23"
(sys.env.get 'FOO)
-> "23"
(sys.env.del! 'FOO)
-> null
(sys.env.get 'FOO)
-> null