[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Remplacez un mot dans plusieurs fichier.



>> "AF" == Alexandre Fayolle <Alexandre> writes:

> On Wed, Jul 10, 2002 at 05:14:18PM +0200, Dominique Billard wrote:
>> Bonjour
>> 
>> Est ce possible de remplacer un mot (ex toto) par un autre (ex titi)dans 
>> plusieurs fichiers, sans les ouvrir un par un à la main.

> for f in * ; do sed s/toto/titi/ $f > $f.new ; mv $f.new $f ; done

Il vaut mieux utiliser perl :

perl -i -pe 's/toto/titi/' *

Christian


-- 
To UNSUBSCRIBE, email to debian-user-french-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: