[CentOS] replace
Pintér Tibor
tibyke at tibyke.huFri Oct 24 21:13:52 UTC 2008
- Previous message: [CentOS] replace
- Next message: [CentOS] replace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phil Schaffner írta: > Mad Unix wrote: >> i need your feedback about this command, it should find a string in >> multiple html files in a directory and replace it with a different >> string... >> >> find /dir -name "*.html" -exec sed -i 's/"old"/"new"/g' {} \; > > Mad Unix, > > find /dir -name "*.html" -exec sed -i -e 's/old/new/g' {} \; > > or > > find /dir -name "*.html" -exec sed -i".bck" -e 's/old/new/g' {} \; > > to keep a backup. perl -pi -e "s/foo/bar/" *.html t
- Previous message: [CentOS] replace
- Next message: [CentOS] replace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list