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
Asked
Active
Viewed 90 times
0
Gilles 'SO- stop being evil'
- 807,993
- 194
- 1,674
- 2,175
phar1no
- 31
- 4
-
1`$3` is being substituted in your shell, before `ssh` sees it. – Michael Homer Jul 24 '15 at 07:22
-
@MichaelHomer is right - what your localhost sees is `df -k / | awk '{print /1024/1024/1024}' ` – amisax Jul 24 '15 at 07:27