<?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=1065161&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1065161</link>
		<description><![CDATA[Les sujets les plus récents dans [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu..]]></description>
		<lastBuildDate>Sun, 14 Oct 2012 16:54:21 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11122241#p11122241</link>
			<description><![CDATA[<p>Chez moi, c&#039;est la même chose :</p><div class="codebox"><pre><code>$ type awk gawk
awk is hashed (/usr/bin/awk)
gawk is /usr/bin/gawk

$ md5sum /usr/bin/awk /usr/bin/gawk
6fe07f3bc9ebc52e0cb7705ddc87609a  /usr/bin/awk
6fe07f3bc9ebc52e0cb7705ddc87609a  /usr/bin/gawk</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sun, 14 Oct 2012 16:54:21 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11122241#p11122241</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11120051#p11120051</link>
			<description><![CDATA[<p>et en utilisant <strong>gawk </strong>plutot que <strong>awk </strong>?</p>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Sun, 14 Oct 2012 13:36:41 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11120051#p11120051</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11119881#p11119881</link>
			<description><![CDATA[<p>J&#039;ai cette version de <strong>awk</strong> :</p><div class="codebox"><pre><code>$ awk --version
GNU Awk 3.1.8</code></pre></div><p>Extrait de <strong>man awk</strong> :</p><div class="quotebox"><blockquote><div><p>--re-interval<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; Enable&#160; the&#160; use&#160; of&#160; interval expressions in regular expression<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; matching (see Regular Expressions, below).&#160; Interval expressions<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; were not traditionally available in the AWK language.&#160; The POSIX<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; standard added them, to make awk and egrep consistent with&#160; each<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; other.&#160; &#160;However, their use is likely to break old AWK programs,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; so gawk only provides them&#160; if&#160; they&#160; are&#160; requested&#160; with&#160; this<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; option, or when --posix is specified.</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sun, 14 Oct 2012 13:15:37 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11119881#p11119881</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11118061#p11118061</link>
			<description><![CDATA[<p>L&#039;option --posix ne semble pas fonctionner pour mon awk. Il me renvoie:</p><div class="quotebox"><cite>terminal a écrit&#160;:</cite><blockquote><div><p>awk: not an option: --posix</p></div></blockquote></div><p>Du coup, j&#039;ai développé un autre code:</p><div class="codebox"><pre><code> if(pos=match(ligne, /[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]/ ))
  	{
  	 
		ipV4=substr($0,pos,12);
		
		gsub(/ (.*)/,&quot;&quot;,ipV4);
		#On affecte à l&#039;ip correpondante un numéro d&#039;anonymat.
		if(ipV4Table[ipV4]==&quot;&quot;)
		{
			ipV4Table[ipV4]=numIPV4;
			numIPV4++;
		}
		
		codeAnonymat=&quot;IPV4$&quot;ipV4Table[ipV4]&quot;$&quot;;
		
		gsub(/[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]/, codeAnonymat, ligne);
			
  	}</code></pre></div><p>Par contre pour l&#039;ipV6, j&#039;utilise cette regexp:<br />/([0-9a-f]{4})(\:([0-9a-f]{4})){7}/<br />Qui bien sûr ne fonctionne pas, elle utilise des accolades..<br />/[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?:[0-9a-f]?[0-9a-f]?[0-9a-f]?[0-9a-f]?/<br />Mais cette regexp ne respecte pas les principes de simplification des IPV6 (suite de 0 consécutifs). Et ne fonctionne pas aussi. :s</p><p>EDIT: pour la dernière, il me dit qu&#039;elle est trop longue. <img src="http://forum.ubuntu-fr.org/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><div class="quotebox"><cite>Terminal a écrit&#160;:</cite><blockquote><div><p>christopher@christopher-R780-R778:~/Cours/Informatique/DM/Systemes/LaTeXnAwk/Q7$ ./q7.sh<br />awk: ./anonymise.awk: line 28: regular expression /([0-9a-fA- ... exceeds implementation size limit</p></div></blockquote></div><p>( :&#039;( ) Ce sont de géniaux programmes awk et sh mais tous ces petits défauts rendent leur pratique difficile pour des problèmes un peu complexes.. <img src="http://forum.ubuntu-fr.org/img/smilies/sad.png" width="15" height="15" alt="sad" /> ) J&#039;ai conscience d&#039;être encore qu&#039;un noob pour les utiliser. Mais même mes débuts en C/C++ et ASM(NASM, TASM, ATnT) étaient moins déprimants que l&#039;utilisation de ces programmes hyper haut-niveaux. Un peu déçu pour le coup..</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sun, 14 Oct 2012 11:00:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11118061#p11118061</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11112051#p11112051</link>
			<description><![CDATA[<p>On ne peut t&#039;aider que si tu donnes un exemple précis de ce qui ne marche pas chez toi : la ligne de commande exacte, et la ou les lignes du fichier qui génèrent une erreur. Est-ce que c&#039;est uniquement dans <strong>awk</strong> ?</p><p><span class="bbu">Ajouté</span> :<br />Dans <strong>awk</strong>, pour traiter ce genre de regex <strong>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</strong>, il faut ajouter l&#039;option <strong>--posix</strong> (ou <strong>--re-interval</strong>) :</p><div class="codebox"><pre><code>awk --posix …</code></pre></div><div class="quotebox"><blockquote><div><p>gsub() ne semble pas fonctionner de la manière que j&#039;aurais pu espérer</p></div></blockquote></div><p>Pour cela, c&#039;est <strong>gensub()</strong> qu&#039;il faut utiliser, mais ce dernier est incompatible avec l&#039;option <strong>--posix</strong>, qu&#039;il faut alors remplacer par <strong>--re-interval</strong>. Par exemple, pour inverser les champs 1 et 2, ainsi que 3 et 4, dans une adresse IP (c&#039;est idiot, mais c&#039;est juste un exemple) :</p><div class="codebox"><pre><code>$ awk --re-interval  &#039;/[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}/{$0=gensub(/(\&lt;[[:digit:]]+)\.([[:digit:]]+)/,&quot;\\2.\\1&quot;,&quot;g&quot;);print}&#039; &lt;&lt;&lt;&quot;125.05.22.57&quot;
05.125.57.22</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sat, 13 Oct 2012 17:47:36 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11112051#p11112051</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11111801#p11111801</link>
			<description><![CDATA[<p>Merci pour toute l&#039;aide que vous m&#039;avez apporté! </p><p>Grâce à vous j&#039;ai quand même bien avancé dans mon programme.. j&#039;ai toujours beaucoup de mal avec la syntaxe trop &quot;stricte&quot; des scripts shells.</p><p>J&#039;obtiens cependant toujours cette erreur pour dbus:</p><div class="quotebox"><cite>terminal a écrit&#160;:</cite><blockquote><div><p>/bin/sh: 1: Syntax error: &quot;(&quot; unexpected</p></div></blockquote></div><p>Les regexp ne semblent pas être une bonne idée. Si vous voulez, je peux vous envoyer mes scripts par MP.</p><p>En parlant de regexp, je me suis lancé dans l&#039; anonymat des IP et des utilisateurs sauf que je ne comprends pas pourquoi une regexp aussi simple que:<br />[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ne parvient pas à fonctionner alors que..<br />[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9] localise les IPs.</p><p>Je désire récupérer l&#039;ip et la changer en une valeur. (123.12.244.2 serait dès qu&#039;elle apparait la valeur 1 etc.)<br />en php on utilise preg_replace(regexp, quoi, chaine); Les parenthèses capturent dans des variables $1(première parenthèse rencontrée) $2 ...<br />En awk, existe-il la même fonction? </p><p>gsub() ne semble pas fonctionner de la manière que j&#039;aurais pu espérer. :s</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sat, 13 Oct 2012 17:29:32 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11111801#p11111801</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11108711#p11108711</link>
			<description><![CDATA[<p>Voir <strong>man awk</strong> :</p><div class="codebox"><pre><code>       asort(s [, d])          Returns  the  number  of elements in the source array s.  The contents of s are
                               sorted using gawk&#039;s normal rules for comparing values, and the indices  of  the
                               sorted  values  of  s are replaced with sequential integers starting with 1. If
                               the optional destination array d is specified, then s is first duplicated  into
                               d, and then d is sorted, leaving the indices of the source array s unchanged.

       asorti(s [, d])         Returns the number of elements in the source array s.  The behavior is the same
                               as that of asort(), except that the array indices are used for sorting, not the
                               array  values.  When done, the array is indexed numerically, and the values are
                               those of the original indices.  The original values are lost;  thus  provide  a
                               second array if you wish to preserve the original.</code></pre></div><p>Voici une exemple issu de mes tests avec ton fichier :<br /><strong>c</strong> est un tableau (c pour compte), indexé par le nom de la machine, et contenant le nombre de fois où ce nom apparaît un jour donné et pour un programme donné.<br />Avant le tri :</p><div class="codebox"><pre><code>c[torched]=3
c[seekers]=1
c[abcdef]=1
c[ghijklm]=1</code></pre></div><p>Après le tri, ce tableau est inchangé, et <strong>cs</strong> est indexé par un entier (pas forcément dans l&#039;ordre), et contient les index du tableau <strong>c</strong>.</p><div class="codebox"><pre><code>cs[4]=torched
cs[1]=abcdef
cs[2]=ghijklm
cs[3]=seekers</code></pre></div><p><strong>n=asorti(c,cs)</strong> est bien le nombre d&#039;éléments de <strong>c</strong>.<br />Quand <strong>i</strong> varie de <strong>1 à n</strong>, <strong>cs[ i]</strong> parcourt les noms de machine par ordre alphabétique, et <strong>c[cs[ i]]</strong> en est le nombre d&#039;occurences.</p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sat, 13 Oct 2012 13:26:51 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11108711#p11108711</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11108261#p11108261</link>
			<description><![CDATA[<p>C&#039;est propre ça, merci.</p><p>asorti(c,cs)<br />C&#039;est pour gérer une sorte de dictionnaire? <br />Cette fonction renvoierait la taille du dictionnaire.<br />Je suis un noob en ss et awk, quel en est le contenu de la fonction asorti?</p><br /><div class="codebox"><pre><code>cs[i], serait la clé, et c[cs[i]] le nombre d&#039;occurrences?</code></pre></div><br /><br /><p>Ensuite sed, c&#039;est l&#039;ancêtre d&#039;awk, non? ^^&#039; (que j&#039;ai simplement entre aperçu dans mon bouquin, Linux de Sebastien Rohaut)</p><br /><p>PS: je viens de remarquer qu&#039;on ne peut pas désactiver le bbcode d&#039;un message? Pourquoi ne pas créer une balise bbcode qui désactiverait à l&#039;intérieur toutes les autres balises et une option qui pourrait désactiver le bbcode d&#039;un message tout entier? --&gt; pb avec les collections c et cs.</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sat, 13 Oct 2012 12:46:12 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11108261#p11108261</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107861#p11107861</link>
			<description><![CDATA[<p>Voici une proposition :</p><p>Fichier de commandes pour <strong>awk</strong></p><div class="codebox"><pre><code>$ cat inawk
function ecrire(jour) {
   if(jour) {
      print jour&quot; :&quot;
      n=asorti(c,cs)
      for (i=1;i&lt;=n;i++) printf(&quot;     %-8s,%3d\n&quot;,cs[i],c[cs[i]])
      delete c
   }
}
$3==prog {
    if(!deja) {print prog&quot;.dat&quot;; deja=1}
    jour=$1
    if(jour!=jour_av) { ecrire(jour_av); jour_av=jour }
    c[$2]++
}
END{ecrire(jour)}</code></pre></div><p>Génération de <strong>prog.extract</strong> (ce qui nous intéresse dans <strong>Syslog</strong>)</p><div class="codebox"><pre><code>sed -rn &quot;s/([^ ]+ ){2}([^ ]+ ){4}([^:[]+)[:[].*/\1\2\3/p&quot; Syslog | sort &gt;prog.extract</code></pre></div><p>Génération des <strong>.dat</strong></p><div class="codebox"><pre><code>while read prog; do awk -v prog=&quot;$prog&quot; -f inawk prog.extract &gt;&quot;$prog&quot;.dat; done &lt;listeProgs.txt</code></pre></div><p>Et pour supprimer les fichiers <strong>.dat</strong> de taille nulle :</p><div class="codebox"><pre><code>find -name \*.dat -size 0 -delete</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sat, 13 Oct 2012 12:18:40 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107861#p11107861</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107651#p11107651</link>
			<description><![CDATA[<p>Salut,<br />Petit exemple de redirection avec awk ; on se retrouve, avec ce simple exemple, avec le contenu de fic.txt dans mon_fic.txt :</p><div class="codebox"><pre><code>awk &#039;{print &gt; &quot;mon_fic.txt&quot;}&#039; fic.txt</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Postmortem)]]></author>
			<pubDate>Sat, 13 Oct 2012 11:54:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107651#p11107651</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107531#p11107531</link>
			<description><![CDATA[<p>Mais dans ce cas, sans utiliser la fonction system(), je fais comment pour rediriger ma sortie avec print ou printf? </p><p>Je voudrais simplement écrire dans data/fichier.dat.</p><br /><p>Je crois avoir entendu mon prof de tp C/C++ en L2-Physique avoir parler d&#039;une possibilité de réorientation du flux. Mais ca c&#039;est possible qu&#039;en C++(avec les cout et cin, ostream), non? pas en C?<br />(je parle du C parce que la syntaxe de awk est quand&#160; même assez proche)</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sat, 13 Oct 2012 11:41:37 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107531#p11107531</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107461#p11107461</link>
			<description><![CDATA[<p>?<br />tu utilises system() pour faire un simple echo ?</p><p>j&#039;avais lu que system() était déconseillé (je ne me souviens pas pourquoi, mais je le crois), c&#039;est surtout très inutile ici.</p>]]></description>
			<author><![CDATA[dummy@example.com (Watael)]]></author>
			<pubDate>Sat, 13 Oct 2012 11:30:19 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11107461#p11107461</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106691#p11106691</link>
			<description><![CDATA[<p>Pardon, j&#039;aurais du copier-coller ma ligne de code.</p><div class="codebox"><pre><code>system(&quot;echo \&quot;&quot; $0 &quot;\&quot; &gt;&gt; authExtract.txt;&quot;); </code></pre></div><br /><p>Ce qui est archi-bizarre, c&#039;est que les résultats dans mes fichiers.dat ont l&#039;air plutôt cohérents. :s</p><div class="quotebox"><cite>Extrait de CRON.dat a écrit&#160;:</cite><blockquote><div><p>2012-09-10<br /> -oft-shawn, 2<br /> -irishman, 4<br /> -inside, 9<br /> -funds, 5<br /> -groin, 3<br /> -sullen, 21<br /> -lacerate, 8<br /> -worshiping, 7<br /> -torched, 6<br /> -smoke-chums, 5<br /> -toots, 5<br /> -turgenev, 1<br /> -leeches, 6<br /> -seekers, 5<br /> -pianos, 7<br /> -tie, 4</p><p>2012-09-11<br /> -oft-shawn, 3<br /> -irishman, 3<br /> -inside, 7<br /> -funds, 9<br /> -groin, 7<br /> -worshiping, 6<br /> -torched, 6<br /> -toots, 8<br /> -smoke-chums, 6<br /> -turgenev, 1<br /> -leeches, 4<br /> -seekers, 4<br /> -pianos, 1<br /> -tie, 6</p></div></blockquote></div><p>Mais cette erreur de syntaxe m&#039;effraie un peu. Il y a un élément qui me dépasse et je n&#039;arrive pas à voir pourquoi.</p><p>Si je comprends bien, quand j&#039;oublie les \&quot; du echo, il va essayer d&#039;exécuter une commande?</p><br /><p>EDIT: Plus particulièrement, l&#039;erreur de syntaxe arrive uniquement lors du traitement du programme dbus.</p><div class="quotebox"><cite>Bash-Terminal a écrit&#160;:</cite><blockquote><div><p>Réinitialisation du fichier authExtract réussie! X=dbus<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />...</p></div></blockquote></div><p>En analysant le fichier syslog, on remarque que les lignes dbus sont vraiment particulières:</p><div class="quotebox"><cite>auth-anonyme-extrait.log a écrit&#160;:</cite><blockquote><div><p>1441452006 2012-09-15 14:24:29 4 5 funds dbus[1444]: 1 [system] Rejected send message, 2 matched rules; type=&quot;method_call&quot;, sender=&quot;:1.118&quot; (uid=71426877 pid=13769 comm=&quot;/usr/bin/pulseaudio --start --log-target=syslog &quot;) interface=&quot;org.bluez.Manager&quot; member=&quot;ListAdapters&quot; error name=&quot;(unset)&quot; requested_reply=&quot;0&quot; destination=&quot;org.bluez&quot; (uid=0 pid=1462 comm=&quot;/usr/sbin/bluetoothd &quot;)<br />1441451938 2012-09-15 14:24:29 4 5 funds dbus[1444]: 1 [system] Rejected send message, 2 matched rules; type=&quot;method_call&quot;, sender=&quot;:1.115&quot; (uid=71426877 pid=13762 comm=&quot;/usr/bin/pulseaudio --start --log-target=syslog &quot;) interface=&quot;org.bluez.Manager&quot; member=&quot;ListAdapters&quot; error name=&quot;(unset)&quot; requested_reply=&quot;0&quot; destination=&quot;org.bluez&quot; (uid=0 pid=1462 comm=&quot;/usr/sbin/bluetoothd &quot;)<br />1441451933 2012-09-15 14:24:29 4 5 funds dbus[1444]: 1 [system] Rejected send message, 2 matched rules; type=&quot;method_call&quot;, sender=&quot;:1.109&quot; (uid=99387319 pid=13750 comm=&quot;/usr/bin/pulseaudio --start --log-target=syslog &quot;) interface=&quot;org.bluez.Manager&quot; member=&quot;ListAdapters&quot; error name=&quot;(unset)&quot; requested_reply=&quot;0&quot; destination=&quot;org.bluez&quot; (uid=0 pid=1462 comm=&quot;/usr/sbin/bluetoothd &quot;)<br />1439773013 2012-09-14 18:15:52 4 5 funds dbus[1444]: 1 [system] Rejected send message, 2 matched rules; type=&quot;method_call&quot;, sender=&quot;:1.80&quot; (uid=71426877 pid=31195 comm=&quot;/usr/bin/python /usr/share/apport/apport-gtk &quot;) interface=&quot;org.freedesktop.DBus.Properties&quot; member=&quot;GetAll&quot; error name=&quot;(unset)&quot; requested_reply=&quot;0&quot; destination=&quot;:1.9&quot; (uid=0 pid=2606 comm=&quot;/usr/sbin/console-kit-daemon --no-daemon &quot;)<br />1439772648 2012-09-14 18:15:52 4 5 funds dbus[1444]: 1 [system] Rejected send message, 2 matched rules; type=&quot;method_call&quot;, sender=&quot;:1.80&quot; (uid=71426877 pid=31195 comm=&quot;/usr/bin/python /usr/share/apport/apport-gtk &quot;) interface=&quot;org.freedesktop.DBus.Properties&quot; member=&quot;GetAll&quot; error name=&quot;(unset)&quot; requested_reply=&quot;0&quot; destination=&quot;:1.9&quot; (uid=0 pid=2606 comm=&quot;/usr/sbin/console-kit-daemon --no-daemon &quot;)</p></div></blockquote></div><p>Peut-être la présence des &quot;&quot; ---&gt; error name=&quot;(unset)&quot;??<br />Après traitement de toute la variable $0 par expression régulière( gsub(/\&quot;/,&quot;\&quot;&quot;,$0);), toujours la même erreur pour dbus, je ne comprends pas.</p><p>PS: je viens de remarquer que pour le fichier dbus.dat, il était vide. <br />Il y a sans doute un élément bizarre dans auth-anonyme-extrait.log qu&#039;il faut que je traite absolument par expression régulière.. mais quoi?</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sat, 13 Oct 2012 10:04:45 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106691#p11106691</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106591#p11106591</link>
			<description><![CDATA[<p>C&#039;est :</p><div class="codebox"><pre><code>system(&quot;echo \&quot;&quot;$0&quot;\&quot; &gt;&gt; fichier.dat&quot;);</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Sat, 13 Oct 2012 09:56:34 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106591#p11106591</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Récupérer dans un tableau chaque ligne d'un fichier lu.]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106461#p11106461</link>
			<description><![CDATA[<p>Voici un petit extrait du fichier syslog en question:</p><div class="quotebox"><cite>Syslog a écrit&#160;:</cite><blockquote><div><p>1431898623 2012-09-11 16:20:27 4 6 torched sshd[5331]: 1 Accepted publickey for root from 41.349.282.58 port 52547 ssh2<br />1429245071 2012-09-10 11:46:08 4 6 torched sshd[13354]: 1 Received disconnect from 41.349.282.58: 11: disconnected by user<br />1429243096 2012-09-10 11:45:58 4 6 torched sshd[13354]: 1 Accepted publickey for root from 41.349.282.58 port 46224 ssh2<br />1429185056 2012-09-10 11:14:05 4 5 torched gnome-keyring-daemon[12204]: 1 couldn&#039;t set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files<br />1429185055 2012-09-10 11:14:05 4 5 torched gnome-keyring-daemon[12204]: 1 couldn&#039;t access conrol socket: /tmp/keyring-pR0iQy/control: Aucun fichier ou dossier de ce type<br />1445668140 2012-09-17 15:00:02 10 3 seekers CRON[9886]: 1 pam_ldap(cron:account): error reading from nslcd: Connection reset by peer<br />1445471855 2012-09-17 13:16:40 10 6 seekers lightdm: 1 pam_unix(lightdm:session): session opened for user lightdm by (uid=0)<br />1445471842 2012-09-17 13:16:38 10 5 seekers polkitd(authority=local): 1 Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.26, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8) (disconnected from bus)<br />1445471841 2012-09-17 13:16:38 10 6 seekers lightdm: 1 pam_unix(lightdm:session): session closed for user 58864406<br />1445400334 2012-09-17 12:34:27 10 5 seekers polkitd(authority=local): 1 Registered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.26 [/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8)</p></div></blockquote></div><p>Par contre, je ne comprends pas pourquoi je reçois ce message, parfois lors du traitement de mes fichiers:</p><div class="quotebox"><cite>Terminal-Bash a écrit&#160;:</cite><blockquote><div><p>/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected<br />/bin/sh: 1: Syntax error: &quot;(&quot; unexpected</p></div></blockquote></div><p>J&#039;ai l&#039;impression que ce message est affiché à chaque fois qu&#039;on a en entrée une parenthèse dans la ligne récupérée, style:<br />1445471842 2012-09-17 13:16:38 10 5 seekers polkitd(authority=local): 1 Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.26, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8) (disconnected from bus)</p><p>Mon moyen de récupérer les lignes est le suivant: (awk)<br />system(&quot;echo &quot;$0&quot; &gt;&gt; fichier.dat&quot;);</p>]]></description>
			<author><![CDATA[dummy@example.com (compte supprimé)]]></author>
			<pubDate>Sat, 13 Oct 2012 09:46:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11106461#p11106461</guid>
		</item>
	</channel>
</rss>
