localhost:~ $ df -k / | awk '{print $3/1024/1024/1024}'
0
0.00618061
localhost:~ $ ssh localhost "df -k / | awk '{print $3/1024/1024/1024}'"
01
01
答案1
当您将参数传递给 SSH 时,您需要更多的引用。尝试这个:
ssh localhost "df -k / | awk '{print \$3/1024/1024/1024}'"
0
0.00623375
注意\
前面的$3
.