echo environment variables mac code example
Example 1: print env variable mac
# Print all environment variables
printenv
Example 2: bash get environment variable
Just type next command to list all environments varialbes in terminal:
printenv
Example 3: mac set environment variable
HIMANSHUs-MacBook-Pro:~ himanshu$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home