Jean-Claude Garaud a écrit :
Mais expr et regex ç'est vraiment tordu : le sujet gagnerait à être plus développé.

C'est vrai que la manipulation des chaines de caractères, c'est assez imbuvable.


J'ai trouvé ça aussi pour utiliser une variable pour la sous-chaîne : bien utile dans un script :
c=neige
echo $(expr "$a" : \.\*$c)

Ah merci, je me demandais justement comment faire !


--
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 à