Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python
- import os, sys
- old = "www.example.com"
- new = "subdomain.example.com"
- recursive = os.popen("find ./ -name '*.php'").read().split("\n")
- for n in recursive:
- name = n.strip()
- if len(name) == 0:
- continue
- handle = file(f, "rw")
- f.write(f.read().replace(old, new))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement