get environment variable command line linux code example
Example 1: print environment variables linux
ENV_VAR="hello world"
printenv ENV_VAR
Example 2: add environment variable linux
export JAVA_HOME=/opt/openjdk11
ENV_VAR="hello world"
printenv ENV_VAR
export JAVA_HOME=/opt/openjdk11