Re: Shell
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. :)
--
François Lafont
Reply to:
- Follow-Ups:
- Re: Shell
- From: BERTRAND Joël <joel.bertrand@systella.fr>
- 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>