How to Print Environment Variables in Linux/Unix
I'll spoil it - "printenv" is your friend. This guide will show a few examples of how to use it.
I'll spoil it - "printenv" is your friend. This guide will show a few examples of how to use it.
printenv
This will print something like this:
...
rvm_bin_path=/Users/josephtyler/.rvm/bin
VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project
TERM_PROGRAM=Apple_Terminal
GEM_HOME=/Users/josephtyler/.rvm/gems/ruby-2.2.0
SHELL=/bin/bash
...
This is a list of environment variable keys and values. There is one key/value pair per line.Still using printenv if you specify a name, then the value is printed (supposing it exists).
printenv RUBY_VERSION
will simply print:
ruby-2.2.0
Making a pour over is one of the simplest, cheapest ways to get an excellent cup of coffee. It takes a little practice to get it just right, but it is absolutely worth it.