<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=376516&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [bash] Sortir une variable d'une boucle While]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=376516</link>
		<description><![CDATA[Les sujets les plus récents dans [bash] Sortir une variable d'une boucle While.]]></description>
		<lastBuildDate>Mon, 01 Feb 2010 22:26:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3252353#p3252353</link>
			<description><![CDATA[<p>Merci en tout cas <img src="http://forum.ubuntu-fr.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 22:26:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3252353#p3252353</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3252127#p3252127</link>
			<description><![CDATA[<div class="quotebox"><cite>percherie a écrit&#160;:</cite><blockquote><div><p>Yes, ça fonctionne très bien le <strong>echo &quot;${download[@]}&quot;</strong>, comment ça ce fait?</p></div></blockquote></div><p>J&#039;ai intégré le &quot;sort&quot; avec le grep. Il n&#039;y a donc plus 2 processus</p><div class="quotebox"><cite>percherie a écrit&#160;:</cite><blockquote><div><p>J&#039;ai supprimé <strong>download=( ) </strong> et ça fonctionne toujours, je ne vois pas très bien à quoi ça peut servir.</p></div></blockquote></div><p>C&#039;est pour vider le tableau (mesure de précaution)</p>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Mon, 01 Feb 2010 20:42:14 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3252127#p3252127</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251732#p3251732</link>
			<description><![CDATA[<p>Yes, ça fonctionne très bien le <strong>echo &quot;${download[@]}&quot;</strong>, comment ça ce fait?</p><p>J&#039;ai supprimé <strong>download=( ) </strong> et ça fonctionne toujours, je ne vois pas très bien à quoi ça peut servir.</p><p>Si c&#039;est possible d&#039;avoir quelques indices de recherche pour que j&#039;apprenne un peut plus dessus je ne suis pas contre</p>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 17:24:41 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251732#p3251732</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251547#p3251547</link>
			<description><![CDATA[<div class="codebox"><pre><code>download=( ) 
while IFS=&#039;,&#039; read paquet depot cle option
 do
   download+=( &quot;${paquet}&quot; )
done &lt; &lt;(grep ^[=] &quot;$1&quot;|sort -u)
echo &quot;${download[@]}&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Mon, 01 Feb 2010 15:51:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251547#p3251547</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251470#p3251470</link>
			<description><![CDATA[<p>et non, sinon les () ne servent à rien, mais tu peux mettre la suite de ton code:</p><p>echo $download<br /># suite du code<br />)</p>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Mon, 01 Feb 2010 15:07:31 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251470#p3251470</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251465#p3251465</link>
			<description><![CDATA[<p>La solution avec parenthèse fonctionne mais je ne peut pas utiliser la variable en dehors du pipe avec par exemple</p><div class="codebox"><pre><code>grep ^[=] proglist.txt ¦ ( while IFS=&#039;,&#039; read paquet depot cle option
 do
   # création de la liste des paquets à télécharger
   download=&quot;$download $paquet&quot;
 done 
)
echo $download #VALEUR EN DEHORS DU PIPE</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 15:01:47 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251465#p3251465</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251458#p3251458</link>
			<description><![CDATA[<p>hello<br />ou en utilisant des ()</p><div class="codebox"><pre><code>grep ^[=] proglist.txt ¦ ( while IFS=&#039;,&#039; read paquet depot cle option
 do
   # création de la liste des paquets à télécharger
   download=&quot;$download $paquet&quot;
 done 
echo $download
)</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Mon, 01 Feb 2010 14:55:50 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251458#p3251458</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251452#p3251452</link>
			<description><![CDATA[<p>Voici ce que j&#039;ai trouvé et qui fonctionne très bien</p><div class="codebox"><pre><code>grep ^[=] proglist.txt &gt; fifo
while IFS=&#039;,&#039; read paquet depot cle option
 do

   # création de la liste des paquets à télécharger
   download=&quot;$download $paquet&quot;

 done &lt; fifo

echo $download #MON RESULTA EST ENFIN LA

rm fifo</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 14:47:59 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251452#p3251452</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251434#p3251434</link>
			<description><![CDATA[<p>Vi je suis en train de me renseigner dessus, j&#039;ai fait un essais sans le sort -u mais comme j&#039;utilise toujours un pipe le problème est toujours là.</p><p>Tu aurai pas une solution qui permet de sortir la variable &quot;locale&quot; d&#039;un pipe?</p>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 14:36:15 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251434#p3251434</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251416#p3251416</link>
			<description><![CDATA[<p>le problème vient du <strong>| sort -u</strong> (plus particulièrement le pipe)<br />cela engendre 2 processus. Donc download reste local au processus où il est utilisé.</p>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Mon, 01 Feb 2010 14:20:32 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251416#p3251416</guid>
		</item>
		<item>
			<title><![CDATA[[bash] Sortir une variable d'une boucle While]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251406#p3251406</link>
			<description><![CDATA[<p>Bonjour,</p><p>Je cherche à utiliser une variable crée dans une boucle while dans le processus père ou comme variable globale, j&#039;ai parcouru beaucoup de pages mais je n&#039;arrive pas à comprendre ce que je doit appliquer à mon script.</p><p>Voci une portion simplifié de ce que je cherche à faire</p><div class="codebox"><pre><code>while IFS=&#039;,&#039; read paquet depot cle option
 do
   # création de la liste des paquets à télécharger
   download=&quot;$download $paquet&quot;

echo $download  #affiche ce que je recherche

 done &lt; &lt;(grep ^[=] $1) | sort -u # on trit le fichier en unique et l&#039;injecte en entrée

echo $download  #AFFICHE AUCUNE REPONSE!!!!</code></pre></div><p>Sinon je pensait exporter la réponse dans un fichier mais c&#039;est moins propre et ne sais de toute façon pas comment faire</p>]]></description>
			<author><![CDATA[dummy@example.com (percherie)]]></author>
			<pubDate>Mon, 01 Feb 2010 14:12:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3251406#p3251406</guid>
		</item>
	</channel>
</rss>
