<?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=1198191&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / commande shell calcul de moyenne!! [Résolu]]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1198191</link>
		<description><![CDATA[Les sujets les plus récents dans commande shell calcul de moyenne!! [Résolu].]]></description>
		<lastBuildDate>Mon, 18 Feb 2013 16:39:05 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  commande shell calcul de moyenne!! [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12624701#p12624701</link>
			<description><![CDATA[<p>Je vous remercies sputnick et pingouinux pour votre aide <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (sab113)]]></author>
			<pubDate>Mon, 18 Feb 2013 16:39:05 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12624701#p12624701</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  commande shell calcul de moyenne!! [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570741#p12570741</link>
			<description><![CDATA[<p>Bonsoir,<br />Et en bash :</p><div class="codebox"><pre><code>n=0;s=0;while read col1 col2;do ((n++));s=$(bc -l &lt;&lt;&lt;&quot;$s + $col2&quot;);done &lt; &lt;(tail -n +2 fichier);bc -l &lt;&lt;&lt;&quot;$s/$n&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Wed, 13 Feb 2013 20:50:18 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570741#p12570741</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  commande shell calcul de moyenne!! [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570661#p12570661</link>
			<description><![CDATA[<p>Voici en awk :</p><div class="codebox"><pre><code>awk &#039;NR&gt;1{v+=$2;count++}END{print v/count}&#039; fichier.txt</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (sputnick)]]></author>
			<pubDate>Wed, 13 Feb 2013 20:36:00 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570661#p12570661</guid>
		</item>
		<item>
			<title><![CDATA[commande shell calcul de moyenne!! [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570591#p12570591</link>
			<description><![CDATA[<p>Bonsoir à tous,</p><p>j&#039;ai un fichier contenant deux colonnes par exemple :</p><div class="quotebox"><blockquote><div><p>colonne 1&#160; colonne 2<br />mot1&#160; &#160; &#160; &#160; &#160; &#160; 0.555<br />mot2&#160; &#160; &#160; &#160; &#160; &#160; 0.657<br />.............................<br />motn&#160; &#160; &#160; &#160; &#160; &#160; 0.586</p></div></blockquote></div><br /><p>en fait, je voudrais faire la moyenne de toute la deuxième colonne par commandes shell. Faire le calcul manuellement me prend beaucoup de temps et j&#039;ai beaucoup de fichiers à traiter.</p><p>en gros faire:</p><div class="codebox"><pre><code>somme=0;moy=0;
for (i =1, i&lt;n, i++) {somme=somme+colonne [i];
                             moy=som/n;}</code></pre></div><p>Merci à l&#039;avance.</p>]]></description>
			<author><![CDATA[dummy@example.com (sab113)]]></author>
			<pubDate>Wed, 13 Feb 2013 20:29:17 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12570591#p12570591</guid>
		</item>
	</channel>
</rss>
