Le Mardi 9 Août 2005 12:33, Jean-Claude Garaud a écrit :
> Tiens, à propos de expr et des "" :
> a="abcd totodefgtotohij"                                                      
>         # un espace avant toto
> echo $(( `expr length ${a%%$cherche*}` + 1 ))
> 5                                                                             
>                 # faux !
> echo $(( `expr length "${a%%$cherche*}"` + 1 ))
> 6                                                                             
>                 # exact

Oh punaise ! 
Je pensais que le ${} suffisait. Merci pour l'info !


-- 
Christophe Gaubert
http://perso.wanadoo.fr/christophe.gaubert
Mail posté depuis un système libre GNU/Linux


____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Répondre à