Le Mon, 16 Jun 2003 11:06:13 +0200, Alain rpnpif a écrit :
Peut-être question de débutant :(
Donc tu es bien au bon endroit :-))
toto='/boot/*'
echo $toto affiche la liste des fichiers de /boot
$ toto='/boot/*'
$ echo $toto
/boot/boot.030A /boot/boot.0310 /boot/boot.save /boot/config
/boot/config-2.4.19-24chris /boot/config-2.4.21-0.13mdk
/boot/config-2.4.21-0.13mdkcustom /boot/config-2.4.21-0.13mdkopt
/boot/config-2.4.21-0.1mdkcustom /boot/fr-latin1.klt /boot/grub
[...]
$ echo $toto
/boot/*
echo '$toto' affiche $toto au lieu de /boot/*.
Normal, entre simple quotes, rien n'est interprété, donc le $ reste un
caractère $
comment afficher le contenu de toto, soit la chaîne de caractères
/boot/* ?
Pour moi, justement avec :
$ echo $toto
ou
$ printf '%s\n' $toto
--
Christophe PEREZ
Vous souhaitez acquerir votre Pack ou des Services MandrakeSoft?
Rendez-vous sur http://www.mandrakestore.com;