Bonjour,

J'ai un fichier de la forme suivante :
[HKEY_LOCAL_MACHINE\system\CurrentcontrolSet\Services\GAteway\Parameters]
"RebootOnException"=dword:00000000


[HKEY_LOCAL_MACHINE\system\CurrentcontrolSet\Services\GAteway\Parameters\Codecs]
"DisableEchoCanceller"=hex(7):00
"CodecPreference"=hex
Je souhaite récupérer les libélles entre crochet.

Jusqu'ici, je n'arrive qu'à récupérer les lignes entre crochets comme suit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
b=` awk ' /HKEY_LOCAL_MACHINE/ {print $0}' $2/$i `
J'obtiens alors une variable ^b contenant :
[HKEY_LOCAL_MACHINE\system\CurrentcontrolSet\Services\GAteway\Parameters]
[HKEY_LOCAL_MACHINE\system\CurrentcontrolSet\Services\GAteway\Parameters\Codecs]
Mais, je ne sais pas quo faire, comment retiré les crochets ?
Ni comment récupérer les premier seulement ?