Substitution conditionnée avec var. en SED
Salut,
Dans un foreach j'utilise une variable comme pré-condition pour une substitution mais ca ne marche pas
sed '/${MyPattern}/ s/toto/_tata_/g' $from_ >! $to_
La variable ne me parait pas etre evaluée dans l'expression
par contre c'est OK si j'explicite la chaine de caractere conditionnelle
sed '/I_Pattern/ s/toto/_tata_/g' $from_ >! $to_
Une idee ?
Dans un foreach j'utilise une variable comme pré-condition pour une substitution mais ca ne marche pas
sed '/${MyPattern}/ s/toto/_tata_/g' $from_ >! $to_
La variable ne me parait pas etre evaluée dans l'expression
par contre c'est OK si j'explicite la chaine de caractere conditionnelle
sed '/I_Pattern/ s/toto/_tata_/g' $from_ >! $to_
Une idee ?