Using sed to replace all strings in a file January 14, 2008

Posted by idimmu in linux.
As part of our test environment rebuild one of the first things we tackled was moving the databases to the new virtual environment, this means changing the database address in a lot of config files, fortunately sed makes this job really easy!


sed -i s/olddatabase/newdatabase/g *.xml


We're also using CNAMEs now for the addresses to make this change a lot easier next time the database moves hardware :)

Tags

Friends

twitter

    lastfm

    • Therapy? – A Moment Of Clarity
    • Therapy? – Unbeliever
    • Therapy? – Die Laughing
    • Finger Eleven – Swallowtail
    • Equilibrium – Mana
    • Equilibrium – Dämmerung
    • Equilibrium – Ruf in Den Wind
    • Equilibrium – Des Sängers Fluch
    • Equilibrium – Die Weide und der Fluß
    • Equilibrium – Heiderauche

    IdleRPG Stats

    • 1 Stu| 44
    • 3 HRH_H_Crab 43
    • 8 Jeekay 43
    • 12 Appocomaster 43
    • 27 Kumquatt 36
    • 36 idimmu 17