Re: Shell
Francois Lafont a écrit :
> On 02/13/2018 09:03 PM, Étienne Mollier wrote:
>
>> Pour aller encore plus loin, il est possible de transférer
>> complètement la main au shell et obtenir du même coup la remontée
>> des éventuels codes d'erreurs en ajoutant des directives exec.
>> Cela donnerait :
>>
>> #!/bin/sh
>> if which bash >/dev/null
>> then
>> exec bash "$@"
>> fi
>> exec /bin/sh "$@"
>
> Ah oui, tout à fait, c'est encore mieux avec le exec. :)
>
>
Bonsoir à tous,
Je vais regarder tout cela attentivement et ferai un retour dès que
possible (j'ai un truc beaucoup plus important sur le feu).
Bien cordialement,
--
http://www.systella.fr
Reply to:
- References:
- Shell
- From: BERTRAND Joël <joel.bertrand@systella.fr>
- Re: Shell
- From: Francois Lafont <mathsattacks@free.fr>
- Re: Shell
- From: Gabriel Moreau <Gabriel.Moreau@legi.grenoble-inp.fr>
- Re: Shell
- From: Étienne Mollier <etienne.mollier@mailoo.org>
- Re: Shell
- From: Francois Lafont <mathsattacks@free.fr>