On Wed, Jul 10, 2002 at 17:30, Christian Marillat wrote: > >> 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/' *
Ou ed : for f in *; do ed $f << eof %s/toto/titi/g w q eof done Etienne -- Bref, j'en ai lu des conneries dans fufe, j'en ai même écrit, mais là, on flirte avec le ruban bleu. -+- RM in : Guide du Neuneu d'Usenet - Ca mérite le GNUban bleu -+- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]