Re: commande sh sous Ubuntu

Pàgina inicial

Reply to this message
Autor: prc
Data:  
A: guilde
CC: prc
Assumpte: Re: commande sh sous Ubuntu
----- "Christian Marillat" <marillat@???> wrote:
> Voir le lien dans mon précédent message.


Pardon, j'avais raté la deuxième liste.

> - The fc builtin checks $EDITOR as a program to edit history entries if FCEDIT is unset, rather than defaulting directly to ed. fc uses ed if EDITOR is unset.
> - As noted above, Bash requires the xpg_echo option to be enabled for the echo builtin to be fully conformant.


---> En gros, en invoquant bash en tant que /bin/sh ou avec --posix, et avec dans les startup scripts:

unset EDITOR
set xpg_echo

Seul 'unset EDITOR' a un effet de bord qui ne devrait pas être traumatisant dans des scripts non-interactifs.
Sinon, contourné si GRUMPF n'est pas utilisé avec quelque chose comme :

function fc { GRUPMF="$EDITOR"; unset GRUPMF; fc $*; EDITOR="$GRUMPF"; unset GRUPMF; }

On devrait alors être "100% compatible POSIX", d'après ce listing de la doc officielle.

Bon à savoir, merci :)

--
Pierre Carrier, Technical Support Engineer
Production Support, EMEA office
Global Support Services
Red Hat, Inc.