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

Re: remplacement occurence dans plusieurs fichiers



Le Wed, 26 Nov 2003 09:37:06 +0100
charles@gizmotronics.dyndns.org écrivait :

> 
> > N'est-il pas plus simple de faire un for?
> > for i in `find . -f type f -print`; do cp $i $i.sed; sed 
> > "s/\/home\/toto\/gallery\//\/home\/sites\/toto\/gallery\//g" $i.sed
> 
> > $i; rm $i; done
> 
> et pour les amateurs de perl et de bash:
> 
> for i in $(find -f type f -print)
> do perl -pe 's:/home/toto/gallery/:/home/sites/toto/gallery/:g'
> done

Petit joueur, va. ;-)

$ find -f -type f -exec perl -pe
's:/home/toto/gallery/:/home/sites/toto/gallery/:g {} \;

PK

PS : comment empêcher sylpheed de justifier seulement un paragraphe ?

-- 
Patrice KARATCHENTZEFF
STMicroelectronics           Tel:  04-76-92-67-96
850, rue Jean Monnet
38926 CROLLES Cedex,  Courriel: patrice.karatchentzeff-alplog@st.com



Reply to: