<?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=1054911&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / Une boucle pour ajout execution d'une commande]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1054911</link>
		<description><![CDATA[Les sujets les plus récents dans Une boucle pour ajout execution d'une commande.]]></description>
		<lastBuildDate>Wed, 03 Oct 2012 07:54:48 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10985271#p10985271</link>
			<description><![CDATA[<div class="quotebox"><cite>pingouinux a écrit&#160;:</cite><blockquote><div><p>Bonjour,<br />@alfirdaous #16 : C&#039;est correct, mais ceci est équivalent :</p><div class="codebox"><pre><code>sudo wget site.com/{1..3}.avi</code></pre></div></div></blockquote></div><p>Oui, c&#039;est juste pour s&#039;assurer que j&#039;ai bien compris la commande, j&#039;ai besoin de cette partie:</p><div class="quotebox"><blockquote><div><p>Si je connais pas le contenu qui est apres le slash du .com, est-il possible d&#039;executer la commande sachant que tous les fichiers sot en .avi</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Wed, 03 Oct 2012 07:54:48 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10985271#p10985271</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10984881#p10984881</link>
			<description><![CDATA[<p>Bonjour,<br />@alfirdaous #16 : C&#039;est correct, mais ceci est équivalent :</p><div class="codebox"><pre><code>sudo wget site.com/{1..3}.avi</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Wed, 03 Oct 2012 06:58:28 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10984881#p10984881</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10983711#p10983711</link>
			<description><![CDATA[<p>donc je peux faire comme ca: Telecharger 1.avi, 2.avi, 3.avi</p><div class="codebox"><pre><code>$ printf &quot;%s\n&quot; {1..3} | xargs -i sudo wget site.com/{}.avi</code></pre></div><p>Si je connais pas le contenu qui est apres le slash du .com, est-il possible d&#039;executer la commande sachant que tous les fichiers sot en .avi</p>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Wed, 03 Oct 2012 00:25:25 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10983711#p10983711</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10973091#p10973091</link>
			<description><![CDATA[<div class="quotebox"><cite>alfirdaous a écrit&#160;:</cite><blockquote><div><p>@credenhill: <br />Il reste le &quot;%s\n&quot; et -i</p><div class="codebox"><pre><code>printf &quot;%s\n&quot; {001..030} | xargs -i </code></pre></div></div></blockquote></div><p>%s\n : affiche un nombre&#160; par ligne<br />xargs -i : remplace {} à droite de xargs par ce qui vient du pipe</p><div class="codebox"><pre><code>$ echo {1..3}
1 2 3
$ 
$ printf &quot;%s\n&quot; {1..3}
1
2
3
$ printf &quot;%s\n&quot; {1..3} | xargs -i echo traitement de {}
traitement de 1
traitement de 2
traitement de 3
$ </code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Tue, 02 Oct 2012 07:16:33 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10973091#p10973091</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10972061#p10972061</link>
			<description><![CDATA[<p>Effectivement, désolé pour cette approximation <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Tue, 02 Oct 2012 05:03:04 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10972061#p10972061</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971851#p10971851</link>
			<description><![CDATA[<p>Bonjour,</p><div class="quotebox"><cite>nesthib #12 a écrit&#160;:</cite><blockquote><div><p>En gros le &lt;&lt; définit que le séparateur qui suit (ici « EOF », mais ça pourrait être n&#039;importe quoi dès lors qu&#039;il n&#039;apparaît pas dans le texte) indiquera la fin du bloc de texte.</p></div></blockquote></div><p>En fait, ce n&#039;est pas tout-à-fait vrai. Le &quot;délimiteur&quot; ne termine le &quot;Here Document&quot; que s&#039;il est seul sur une ligne, mais il peut apparaître dans le texte. Pour reprendre ton exemple, ceci marche aussi.</p><div class="codebox"><pre><code>cat &lt;&lt;FIN
bonjour
voici plusieurs lignes
Oh, il y a le mot FIN !
dans lesquelles je ne m&#039;occupe pas
du contenu (comme des &quot;)
FIN</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Tue, 02 Oct 2012 03:58:53 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971851#p10971851</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971701#p10971701</link>
			<description><![CDATA[<p>de quelle commandes parles-tu ? Du &lt;&lt;EOF ? Ça n&#039;est pas une commande mais une syntaxe shell (et d&#039;autres langages) courante appelée « here document ». En gros le <strong>&lt;&lt;</strong> définit que le séparateur qui suit (ici « EOF », mais ça pourrait être n&#039;importe quoi dès lors qu&#039;il n&#039;apparaît pas dans le texte) indiquera la fin du bloc de texte. Pour la doc, tu la trouveras par exemple dans le man de bash à la section <strong>Here Documents</strong></p><div class="codebox"><pre><code>cat &lt;&lt;FIN
bonjour
voici plusieurs lignes
dans lesquelles je ne m&#039;occupe pas
du contenu (comme des &quot;)
FIN</code></pre></div><p>En ce qui concerne les question que tu poses à credenhill, essaie de faire un petit effort de recherche… en l&#039;occurrence pour la seconde il suffit de lire le man. Pour la première <strong>%s</strong> représente une chaîne de caractère (string) qui sera définie par l&#039;argument qui suit (ici la suite de nombres) et <strong>\n</strong> représente un saut de ligne.</p><p>NB. simple curiosité, mais en quoi as-tu besoin des droits root pour faire une conversion vidéo ?</p>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Tue, 02 Oct 2012 02:31:24 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971701#p10971701</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971521#p10971521</link>
			<description><![CDATA[<p>@credenhill: </p><p>Il reste le &quot;%s\n&quot; et -i</p><div class="codebox"><pre><code>printf &quot;%s\n&quot; {001..030} | xargs -i </code></pre></div><p>@nesthib: ou puis je trouver la doc de ces commandes</p><p>Merci</p>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Tue, 02 Oct 2012 00:44:35 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971521#p10971521</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971471#p10971471</link>
			<description><![CDATA[<p>oui c&#039;est vrai, mais le traitement demande entre 30 et 40 minutes</p>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Tue, 02 Oct 2012 00:20:16 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10971471#p10971471</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10970821#p10970821</link>
			<description><![CDATA[<p>Non, sudo ne devrait pas te demander le mot de passe à chaque fois. Il y a un laps de temps pendant lequel sudo ne redemande pas le mot de passe (10 minutes par défaut).<br />Si tu veux tu peux encapsuler le tout en root en lançant le script lui même avec sudo ou en faisant :</p><div class="codebox"><pre><code>sudo bash &lt;&lt;EOF
commande 1
for … ; do commande 2 ; done
commande 3
EOF</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Mon, 01 Oct 2012 22:34:45 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10970821#p10970821</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10968431#p10968431</link>
			<description><![CDATA[<p>En utilisant sudo, la console va nous demander le mot de passe a chaque nouvelle execution, il n&#039;est pas recommande d&#039;utiliser sudo, mais y a t il un moyen d&#039;entrer le mot de passe en notre absence?</p>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Mon, 01 Oct 2012 19:50:45 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10968431#p10968431</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10964451#p10964451</link>
			<description><![CDATA[<p>Après, faire une seule ligne sans raison, ça n&#039;a pas trop de sens… surtout si tu ne comprends pas pourquoi.<br />En plus tu peux mettre le bloc for sur une seule ligne :</p><div class="codebox"><pre><code>for i in … ; do commande ; done</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Mon, 01 Oct 2012 15:07:29 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10964451#p10964451</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10963511#p10963511</link>
			<description><![CDATA[<p>printf va envoyer 001, 002 etc et xargs va exécuter la commande sudo ffmpeg ... pour chaque nombre, donc</p><div class="codebox"><pre><code>sudo ffmpeg -i INPUT001.mp4  ...  OUTPUT001.mp4
sudo ffmpeg -i INPUT002.mp4 ... OUTPUT002.mp4
sudo ffmpeg -i INPUT003.mp4 ... OUTPUT003.mp4
...</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Mon, 01 Oct 2012 13:42:04 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10963511#p10963511</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10963331#p10963331</link>
			<description><![CDATA[<p>Merci credenhill: j&#039;ai pas compris cette partie du code:</p><div class="codebox"><pre><code>printf &quot;%s\n&quot; {001..030} | xargs</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (alfirdaous)]]></author>
			<pubDate>Mon, 01 Oct 2012 13:25:38 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10963331#p10963331</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Une boucle pour ajout execution d'une commande]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=10962831#p10962831</link>
			<description><![CDATA[<p>hello</p><div class="codebox"><pre><code>printf &quot;%s\n&quot; {001..030} | xargs -i  sudo ffmpeg -i INPUT{}.mp4 -strict experimental -vf &quot;drawtext=fontfile=&#039;/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf&#039;:text=&#039;Test Text&#039;:x=10:y=10:fontsize=20:fontcolor=white&quot; -vcodec libx264 -crf 30 OUTPUT{}.mp4</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Mon, 01 Oct 2012 12:21:56 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=10962831#p10962831</guid>
		</item>
	</channel>
</rss>
