<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Latest snippets tagged grep</title>
  <link rel="alternate" href="http://snippets.prendreuncafe.com/snippets/tagged/grep/order_by/date"></link>
  <id>http://snippets.prendreuncafe.com/snippets/tagged/grep/order_by/date</id>
  <updated>2007-01-30T15:46:18Z</updated>
  <author>
    <name>Symfony</name>
    <author_email>noreply@symfony-project.com</author_email>
  </author>
<entry>
  <title>Ajouter automatiquement tous les nouveaux fichiers et dossiers dans un dépôt Subversion</title>
  <link href="http://snippets.prendreuncafe.com/snippet/49"></link>
  <updated>2007-01-30T15:46:18Z</updated>
  <id>49</id>
  <summary type="html">The command line is my friend.

[code]
$ svn stat | grep ? | awk '{ print $2 }' | xargs svn add
[/code]</summary>
</entry>
<entry>
  <title>Compter le nombre d'occurence d'un terme dans un répertoire</title>
  <link href="http://snippets.prendreuncafe.com/snippet/42"></link>
  <updated>2007-01-16T12:33:47Z</updated>
  <id>42</id>
  <summary type="html">Dans tous les fichiers de type texte, calcul du nombre d'occurence d'une chaîne de caractère avec grep et wc :

[code]
$ grep -r require_once /path/to/scan | wc -l
1454
[/code]

On peut aussi exclure certaines ressources ou répertoires, avec grep -v :

[code]
$ grep -r require_once /path/to/scan | grep -v .svn | wc -l
735
[/code]</summary>
</entry>
</feed>