[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Far girare uno script ogni 10 sec



On Wed, 1 Jun 2005, int wrote:

Preferirei:

   until the end; do
   /usr/bin/mio_script
   sleep 10
   done

Siccome [ dovrebbe essere un programma esterno (che si chiama test),
viene lanciato ogni volta. Invece, until prende un list "the end" che
non esiste, non esistendo da errore quindi l'until procede. E poi è più
leggibile no? :-)

scusa se faccio il pignolo... :-) ma test è un comando builtin della bash:

man bash:
[...]
CONDITIONAL EXPRESSIONS
Conditional expressions are used by the [[ compound command and the test and [ builtin commands to test file attributes and perform
       string  and  arithmetic  comparisons.
[...]

e quindi viene eseguito senza accedere a nessun file, mentre il tuo "until the end" deve fare un accesso al file system per verificare se esiste o no il comando "the" :-)

bye
CDF

Reply to: