X-zcer / PIT-with-RTS

0 stars 0 forks source link

(五十九)shell将执行命令赋值给变量 #60

Open X-zcer opened 6 years ago

X-zcer commented 6 years ago

data=`df` 用反引号就可以了

$var $var={`df -lh | grep Filesystem`}

经过验证如下: date=$(command)

default

X-zcer commented 6 years ago

好像记得用eval是不行的