Ne serait-ce pas mieux un truc du genre var="$(pidof squid)" ou var=`pidof squid`?
A moins que la syntaxe wiki ait fait sauter les quotes ...
Sinon, si je vais voir la page man de pidof :
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in /etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead.
# je vois un problème ...
Posté par totof2000 . En réponse au message script shell qui ne fonctionne pas à partir de crontab. Évalué à 2. Dernière modification le 01 octobre 2014 à 14:37.
Ne serait-ce pas mieux un truc du genre var="$(pidof squid)" ou var=`pidof squid`?
A moins que la syntaxe wiki ait fait sauter les quotes ...
Sinon, si je vais voir la page man de pidof :
tu réécris start-stop-daemon.