shell 执行结果赋给变量

#将pwd的执行结果放到变量value中保存,

value=$(pwd)

另一种方法:

value=`pwd`

原文地址:https://www.cnblogs.com/kakaisgood/p/8335708.html