[Linux-bruxelles] Lancer un script en lui désignant son environnement

Serge Smeesters perso at sergesmeesters.be
Sam 22 Jan 19:40:28 CET 2005


>>> En pratique, quand je tape:
>>> yannick at machin:/home/yannick/src/php$ php4 monscript.php
>>> ça fonctionne, mais pas quand je tape
>>> yannick at machin:/$ php4 /home/yannick/src/php/monscript.php
>>> 
>>> Ça doit être tout bête mais je ne sais pas très bien à quoi chercher...

>> Moi, je connais ceci :
>> 
>>    cd /home/yannick/src/php ; pwd ; cd -

[...]
> il me faudrait plutôt un truc genre 'exec -x -y -z blablabla'
> qui tienne en une commande...

Peut-être plutôt

   bash -c "cd /etc/; echo "Hello" ; pwd ; echo "Yohp" ;cd -"

?
(la denière instruction n'est alors plus vraiment utile...


Sinon, as-tu envisagé de faire un script ?


Serge.





Plus d'informations sur la liste de diffusion Linux-bruxelles