0
je suit dans script.tcl
:erreur de stat d'opérande manquant lorsqu'il est exécuté à partir du fichier tcl en utilisant exec
#!/usr/bin/env tclsh
set disk(free) [exec -- stat -f -c 'scale=3;(%a*%S)/1024/1024/1024'/| bc ]
Lorsque j'exécute le script, je reçois la sortie suivante: (traduit du hongrois)
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)
Qu'est-ce que je fais mal? Exécuter la commande sur son propre fonctionne très bien.