Syndicate content

sed

Aug 31
0

Linux find and replace within file

Tue, 2010-08-31 15:16 — superuser

To find and replace across a file (or files) or a SQLdump you can do something like the following

sed -i 's/sites\/default/sites\/newsite/g' newsite.sql

Note the forward slashes have been escaped in the above examples