Sujet : Re: setsid avec des variables d'environnement
De : om+news (at) *nospam* miakinen.net (Olivier Miakinen)
Groupes : fr.comp.os.linux.configurationDate : 30. Jan 2022, 23:36:21
Autres entêtes
Organisation : There's no cabale
Message-ID : <st73t5$25su$1@cabale.usenet-fr.net>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4
Le 30/01/2022 22:53, Jo Engo a écrit :
cmd="LD_LIBRARY_PATH=/some/path /some/command"
Je voudrais bien t'aider, mais j'ai un problème en amont :
$ toto="titi" /usr/bin/printf \"%s\" $toto
""
Je devrais avoir "titi" en sortie, non ?
Non, parce que $toto est interprété par le shell avant d'exécuter la commande.
En revanche :
$ cat x
/usr/bin/printf \"%s\" $toto
$ toto="titi" ./x
"titi"$
-- Olivier Miakinen