Bonjour,
Dans un script (bash 5.0.3(1), debian 10), je tente de récupérer le résultat d'une commande sed dans une variable.
DOMAIN=
http://toto.com/
sed '/^abc\|^$/! { p; s|^| -> '$DOMAIN'|g }' mon_fichier
Dans la commande, le séparateur de la substitution est | car avec / il y a un conflit avec le / de la cariable DOMAIN
J'ai tenté diverses expressions, comme par exemple dans une variable :
RES=$( sed '/^abc\|^$/! { p; s|^| -> '$DOMAIN'|g }')
ou en écrivant dans un fichier, avec une subsitution de commande ou sans : $(sed '/^abc\|^$/! { p; s|^| -> '"$DOMAIN"'|g }' "$RES" > mon_fichier)
ou sans :
$(sed '/^abc\|^$/! { p; s|^| -> '"$DOMAIN"'|g }' "$RES" > mon_fichier)
Dans le script, je n'arrive pas du tout à obtenir le résultat escompté, tant via la variable que par le fichier : RIEN, même pas le résultat aplati/sans séparateur que j'obtiens en ligne de commande ci-dessous.
En ligne de commande, j'obtiens exactement le résultat escompté sur stdout ou dans le fichier.
foo
bar
baz
truc
machin
TOUTEFOIS, il y a un indice pour la question posée. Quand je fais :
echo $RES
J'obtiens le résultat aplati, sans séparateur :
foo bar baz truc machin
J'ai écumé de nombreux forums où ce problème est soulevé. Sans trouver la clef.
J'ai tenté de prende une valeur de DOMAIN sans / pour une expression de sed avec des / au lieu de | : idem.
Quel mystère y a-t-il qui m'échapperait donc ?
Je me dis qu'il y a une option de sed qui m'échappe ou une obscure histoire de contexte bash.
Merci pour vos lumières/bougies/loupiotes !
Cordialement
Roger
<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Bonjour,</div><div><br data-mce-bogus="1"></div><div>Dans un script (bash 5.0.3(1), debian 10), je tente de récupérer le résultat d'une commande
sed dans une variable.</div><div><br data-mce-bogus="1"></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">
DOMAIN=
http://toto.com/</span></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> sed '/^abc\|^$/! { p; s|^|&
nbsp; -> '$DOMAIN'|g }' mon_fichier</span><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #
ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style:
normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-
width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Dans la commande, le </span>séparateur de la substitution est | car
avec / il y a un conflit avec le / de la cariable DOMAIN </div><div><br data-mce-bogus="1"></div><div><div>J'ai tenté diverses expressions, comme par exemple dans une variable :</div><div><span style="font-family: "courier new", courier,
monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> RES=$(<span style="color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-
decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-
caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-
thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">sed '/^abc\|^$/! { p; s|^| -> '$DOMAIN'|g }')</span></span><div style="clear: both;" data-mce-style="clear: both;"><br><
/div><div style="clear: both;" data-mce-style="clear: both;">ou en écrivant dans un fichier, avec une subsitution de commande ou sans :<br></div></div><div><span style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(
255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important; font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="
orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important; font-family: 'courier new',
courier, monaco, monospace, sans-serif;"> $(sed '/^abc\|^$/! { p; s|^| -> '"$DOMAIN"'|g }' "$RES" > mon_fichier)</span></div><div><span style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255,
255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style:
normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-
width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><br data-mce-bogus="1"></span></div><div><span style="orphans: 2; text-
align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000;
font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"></
span><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-
indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display:
inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans:
2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-
decoration-color: initial; display: inline !important; float: none;">ou sans :</span><br></div><div><div><div style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-
variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-
decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-
caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-
thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span data-mce-style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style:
initial; text-decoration-color: initial; float: none; display: inline !important; font-family: 'courier new', courier, monaco, monospace, sans-serif;" style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255);
text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; font-family: "courier new", courier, monaco, monospace, sans-serif; display: inline !important;"> $(sed '/^abc\|^$/! { p; s|^
| -> '"$DOMAIN"'|g }' "$RES" > mon_fichier)</span></div><div style="clear: both;" data-mce-style="clear: both;"><br data-mce-bogus="1"></div><div style="clear: both;" data-mce-style="clear: both;"><br data-mce-bogus="1"></div>Dans le script,
je n'arrive pas du tout à obtenir le résultat escompté, tant via la variable que par le fichier : RIEN, même pas le résultat aplati/sans séparateur que j'obtiens en ligne de commande ci-dessous.</div><div><br></div><div><br></div><div style="
clear: both;" data-mce-style="clear: both;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">En ligne de commande, j'obtiens exactement le résultat escompté sur stdout ou dans le fichier.</span><br></div><div style="clear: both;" data-
mce-style="clear: both;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px;
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-
text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-indent: 0px;
widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family: 'courier new'
, courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"
style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-
decoration-color: initial; float: none; display: inline !important;"> foo</span></span></span></span></div><div style="clear: both;" data-mce-style="clear: both;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-
size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #
ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255);
text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family: 'courier new', courier, monaco, monospace, sans-serif; font-
size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(0, 0, 0); font-family: "
courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-
transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none;
display: inline !important;"> <span> </span></span></span></span></span></span><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #
000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float:
none;" style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><
span data-mce-style="color: #000000; font-family: 'courier new', courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-
color: initial; display: inline !important; float: none;" style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps:
normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-
decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">bar</span></span></span></span></div><div style="clear: both;" data-mce-style="clear: both;"><span style="font-size:
12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif;
font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing:
0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-
indent: 0px; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family:
'courier new', courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-
transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important;
float: none;" style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-
style: initial; text-decoration-color: initial; float: none; display: inline !important;"> <span> </span></span></span></span></span></span><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-
style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-
color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family: 'courier new', courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness:
initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style:
normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-
width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">baz</span></span></span></span></div><div style="clear: both;"
data-mce-style="clear: both;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size:
16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -
webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-indent: 0px;
widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family: 'courier
new', courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"
style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-
decoration-color: initial; float: none; display: inline !important;"> truc</span></span></span></span></div><div style="clear: both;" data-mce-style="clear: both;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-
size: 12pt;" data-mce-style="font-size: 12pt;"><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-
spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-
style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="orphans: 2; text-align: start; text-indent: 0px; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style:
initial; text-decoration-color: initial; float: none; display: inline !important;"><span data-mce-style="color: #000000; font-family: 'courier new', courier, monaco, monospace, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #
ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif;
font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing:
0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"> machin</span></span></span></
span><div data-mce-style="clear: both;" style="clear: both;"><br></div></div></div></div><div><div><div>TOUTEFOIS, il y a un indice pour la question posée. Quand je fais :</div><div><span style="font-family: "courier new", courier, monaco,
monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> echo $RES</span></div><div><span style="font-family: arial, helvetica, sans-serif;" data-mce-style="font-family: arial, helvetica, sans-
serif;"><br data-mce-bogus="1"></span></div><div><span style="font-family: arial, helvetica, sans-serif;" data-mce-style="font-family: arial, helvetica, sans-serif;">J'obtiens le résultat aplati, sans séparateur :</span></div><span style="font-family: &
quot;courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> foo bar baz truc machin</span></div><div><br data-mce-bogus="1"></div></div><div><br></div><div>J'
ai écumé de nombreux forums où ce problème est soulevé. Sans trouver la clef.</div><div><br data-mce-bogus="1"></div><div>J'ai tenté de prende une valeur de DOMAIN sans / pour une expression de sed avec des / au lieu de | : idem. </div><
<br data-mce-bogus="1"></div><div>Quel mystère y a-t-il qui m'échapperait donc ?</div><div>Je me dis qu'il y a une option de sed qui m'échappe ou une obscure histoire de contexte bash.</div><div><br></div><div><br data-mce-bogus="1"></div><div><
span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Merci pour vos lumières/bougies/loupiotes !</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br data-mce-bogus="1"></span></div><div><span style="font-size:
12pt;" data-mce-style="font-size: 12pt;">Cordialement</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Roger</span></div></div></body></html>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)