Created
January 12, 2018 02:09
-
-
Save srinivasreddy/29a4ee8a1bc25ed9171b8cb1aeaaafb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cargo git:(master) echo $NAME | |
➜ cargo git:(master) export NAME='Srinivas' | |
➜ cargo git:(master) echo $NAME | |
Srinivas | |
➜ cargo git:(master) python | |
Python 2.7.12 (default, Nov 20 2017, 18:23:56) | |
[GCC 5.4.0 20160609] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import o | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ImportError: No module named o | |
>>> import os | |
>>> print os.environ.get('NAME') | |
Srinivas | |
>>> print os.environ.get('LAST_NAME') | |
None | |
>>> print os.environ.get('LAST_NAME', 'Reddy') | |
Reddy | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment