UNIX, get environment variable

前端 未结 7 803
滥情空心
滥情空心 2020-12-30 18:41

I have a ridiculous question due to a ridiculous problem.

Normally if I want to get the contents of an environment variable in UNIX shell, I can do

         


        
7条回答
  •  时光取名叫无心
    2020-12-30 19:14

    type the following command in terminal, it will display all the list of environment variables

    printenv

    now print the wanted variable like this:

    echo $VARIABLENAME

提交回复
热议问题