私は次のものを持っていますscript.tcl
:
#!/usr/bin/env tclsh
set disk(free) [exec -- stat -f -c 'scale=3;(%a*%S)/1024/1024/1024' / | bc ]
スクリプトを実行すると、次の出力が得られます: (ハンガリー語からの翻訳)
stat: missing operand
For more information execute the „stat --help” command.
while executing
"exec -- stat -f -c 'scale=3"
invoked from within
"set disk(free) [exec -- stat -f -c 'scale=3;(%a*%S)/1024/1024/1024' / | bc ]"
(file "~/script.tcl" line 2)
私は何を間違っていますか?コマンドを単独で実行すると、問題なく動作します。