linux在shell中执行命令并将结果赋值给变量

data=`df`

用反引号就能够了spa


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


通过验证以下:
date=$(command)
grep