<?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=1060891&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1060891</link>
		<description><![CDATA[Les sujets les plus récents dans [Resolu] CKSFV reprendre le résultat pour faire un IF.]]></description>
		<lastBuildDate>Sun, 07 Oct 2012 17:25:55 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11039271#p11039271</link>
			<description><![CDATA[<p>Merci pingouinux et nesthib pour votre aide et aussi pour toutes les infos données.</p><p>et voilà le bon code:</p><div class="codebox"><pre><code>err=$(cksfv -qf *.sfv 2&gt;&amp;1)
 
if [ ${#err} -ne 0 ];
 then
      echo &quot;Please fix the file(s) and try again.&quot;
 else
     echo &quot;Everything OK.&quot;
      unrar x *.rar
 fi</code></pre></div><p>Je vais mettre résolu.</p>]]></description>
			<author><![CDATA[dummy@example.com (baba00000000)]]></author>
			<pubDate>Sun, 07 Oct 2012 17:25:55 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11039271#p11039271</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038721#p11038721</link>
			<description><![CDATA[<p>@nesthib : Merci pour ces précisions, car je ne parle pas le web couramment. <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sun, 07 Oct 2012 16:40:33 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038721#p11038721</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038661#p11038661</link>
			<description><![CDATA[<div class="quotebox"><cite>pingouinux a écrit&#160;:</cite><blockquote><div><p>mais <strong>2&amp;gt;&amp;amp;1</strong> me paraît bizarre.</p></div></blockquote></div><p>Le script est sûrement récupéré du web, il s&#039;agit de <a href="https://en.wikipedia.org/wiki/Html_special_characters#Character_entity_references_in_HTML">caractères spéciaux en HTML</a>.</p><p>&amp;gt; → &gt;<br />&amp;amp; → &amp;</p><p>il faut donc lire :</p><div class="codebox"><pre><code>commande 2&gt;&amp;1</code></pre></div><p>soit une redirection de stderr sur stdout</p>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Sun, 07 Oct 2012 16:34:21 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038661#p11038661</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038471#p11038471</link>
			<description><![CDATA[<p>Ça devrait marcher, mais je pense que ceci aussi :</p><div class="codebox"><pre><code>cksfv -c -f *.sfv || echo &quot;Please fix the file(s) and try again.&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sun, 07 Oct 2012 16:08:38 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038471#p11038471</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038361#p11038361</link>
			<description><![CDATA[<p>J&#039;ai fais un truc du style:</p><div class="codebox"><pre><code>err=`cksfv -c -f *.sfv | grep -c &#039;Everything&#039;`
if [ $err -ne 1 ];
 then
 echo $err; 
     echo &quot;Please fix the file(s) and try again.&quot; 
else
  echo &quot;Everything OK.&quot;  
fi</code></pre></div><p>J&#039;ai magouiller, car c&#039;est pas forcément ce qu&#039;il faut faire. <br />Comme je sais que le résultat est soit Errors Occured ou Everything Ok.</p><p>Edit: Merci pingouinux pour ton éclaircissement sur mon problème. J&#039;allais oublier le plus important.</p>]]></description>
			<author><![CDATA[dummy@example.com (baba00000000)]]></author>
			<pubDate>Sun, 07 Oct 2012 15:56:54 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11038361#p11038361</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11034081#p11034081</link>
			<description><![CDATA[<p>Bonjour,<br />Je ne connais pas <strong>cksfv</strong>, mais voici ce que je peux dire :</p><div class="quotebox"><blockquote><div><p># created by Daniel Høyer Iversenerr=$(cksfv -qf *.sfv 2&amp;gt;&amp;amp;1)</p></div></blockquote></div><p>La commande est incluse dans le commentaire. C&#039;est sans doute ceci :</p><div class="codebox"><pre><code># created by Daniel Høyer Iversen
err=$(cksfv -qf *.sfv 2&amp;gt;&amp;amp;1)</code></pre></div><p>mais <strong>2&amp;gt;&amp;amp;1</strong> me paraît bizarre.</p><div class="quotebox"><blockquote><div><p>je ne comprends pas trop dans le if ${#err}</p></div></blockquote></div><p><strong>${#err}</strong> est le nombre de caractères du contenu de la variable <strong>$err</strong></p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sun, 07 Oct 2012 10:41:44 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11034081#p11034081</guid>
		</item>
		<item>
			<title><![CDATA[[Resolu] CKSFV reprendre le résultat pour faire un IF]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11033241#p11033241</link>
			<description><![CDATA[<p>Bonjour à tous et merci pour l&#039;aide futur.</p><p>Je vais essayer d&#039;être le plus clair possible. </p><p>J&#039;ai trouve ce code: </p><div class="codebox"><pre><code>#!/bin/bash
 
# require cksfv http://packages.ubuntu.com/feisty/i386/cksfv/download
 
# created by Daniel Høyer Iversenerr=$(cksfv -qf *.sfv 2&amp;gt;&amp;amp;1)
 
if [ ${#err} -ne 0 ];
 
then
 
     echo $err;
 
     echo &quot;Please fix the file(s) and try again.&quot;
 
else
 
     echo &quot;Everything OK.&quot;
 
     unrar x *.rar
 
fi</code></pre></div><p>A cette adresse: <a href="http://dahoiv.net/programmering/bash/bash-script-for-sfv-and-uncompressing-of-r00-files">http://dahoiv.net/programmering/bash/ba … -r00-files</a></p><p>j&#039;arrive à bien faire mon chsfv, mais n&#039;arrive pas à prendre l&#039;erreur afin de fin ou le résultat positif afin que mon IF marche par la suite.</p><p>Deuxième chose je ne comprends pas trop dans le if ${#err} </p><p>Merci à tous.</p>]]></description>
			<author><![CDATA[dummy@example.com (baba00000000)]]></author>
			<pubDate>Sun, 07 Oct 2012 10:01:34 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11033241#p11033241</guid>
		</item>
	</channel>
</rss>
