2015-11-04, 08:22:13
MAMP ? Meaning Mac ? Then your system should be unix-like enough to solve the problem with one line in the terminal:
What this does: It loops over all the XML-files and uses the stream editor 'sed' on each file to substitute 'http://localhost/' with 'http://real-address/' globally (that's the 'g' after the substitution-command, it would only do one substitution per line without it). The '-i' option makes sed do 'in place editing' instead of dumping the edited stream to standard output, the '.bak' after the '-i' tells it to make backups with the extension '.bak'.
Replace '/path/to/GetSimple/' and 'real-address' with appropriate values. As always before doing batch-changes on important data: make a backup.
H.
Code:
cd /path/to/GetSimple/data/pages;for i in *.xml;sed -i.bak 's#http://localhost/#http://real-address/#g' "$i";done
What this does: It loops over all the XML-files and uses the stream editor 'sed' on each file to substitute 'http://localhost/' with 'http://real-address/' globally (that's the 'g' after the substitution-command, it would only do one substitution per line without it). The '-i' option makes sed do 'in place editing' instead of dumping the edited stream to standard output, the '.bak' after the '-i' tells it to make backups with the extension '.bak'.
Replace '/path/to/GetSimple/' and 'real-address' with appropriate values. As always before doing batch-changes on important data: make a backup.
H.