Jeremy> Si je ne trompe pas, find devrait t'aider : find . -name
Jeremy> \*.php -exec <cmd> {} \; où <cmd> = perl -p -i -e
Jeremy> 's/rep1//rep2\//g'
Ben je prefere:
find . name "*.php" | xargs perl -p -i -e's/rep1//rep2\//g'
Je trouve que c'est plus rapide a tapez, plus facile a memoriser...
<digression>
xargs est votre ami!
man xargs
De plus xargs peut servir en dehors de find. Un exemple qui m'arrive
de temps en temps. Je fais:
tar xzf gros_machin_debil.tar.gz
Malheur! Le packet n'est pas dans un repertoire est me pourri m'a
partition home avec des fichier est des repertoires partout. Comment
nettoyer tout ça efficacement? Avec xargs:
tar tzf gros_machin_debil.tar.gz | xargs rm -r
</digression>
A+,
Linuxieusement,
Ivan
--
/-----------------------------------------------------------------------------*
| "Twenty years from now you will be more disappointed | |
| by the things that you didn't do than by the ones you | Ivan Kanis |
| did do... Sail away from the safe harbor. Catch the | [EMAIL PROTECTED] |
| trade winds in your sails. Explore. Dream. Discover." | www.juliva.com |
| (Mark Twain) | |
*-----------------------------------------------------------------------------/
Linux-Azur : http://www.linux-azur.org
Désinscriptions: http://www.linux-azur.org/liste.php3
**** Pas de message au format HTML, SVP ****