Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Development/Deployment Questions
#7
MAMP ? Meaning Mac ? Then your system should be unix-like enough to solve the problem with one line in the terminal:

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.
Reply


Messages In This Thread
Development/Deployment Questions - by lnickel - 2015-10-31, 03:54:44
RE: Development/Deployment Questions - by shawn_a - 2015-10-31, 08:25:05
RE: Development/Deployment Questions - by lnickel - 2015-11-03, 06:52:42
RE: Development/Deployment Questions - by shawn_a - 2015-11-03, 23:01:57
RE: Development/Deployment Questions - by lnickel - 2015-11-03, 23:58:01
RE: Development/Deployment Questions - by hddg - 2015-11-04, 08:22:13
RE: Development/Deployment Questions - by shawn_a - 2015-11-04, 23:25:09
RE: Development/Deployment Questions - by lnickel - 2015-11-06, 05:51:24
RE: Development/Deployment Questions - by shawn_a - 2015-11-06, 06:55:03
RE: Development/Deployment Questions - by Carlos - 2015-11-06, 07:22:33
RE: Development/Deployment Questions - by Carlos - 2015-11-06, 23:22:41
RE: Development/Deployment Questions - by lnickel - 2015-11-07, 01:04:15
RE: Development/Deployment Questions - by Carlos - 2015-11-07, 01:37:01
RE: Development/Deployment Questions - by lnickel - 2015-11-07, 02:15:42
RE: Development/Deployment Questions - by shawn_a - 2015-11-07, 03:15:33
RE: Development/Deployment Questions - by Carlos - 2015-11-07, 03:33:57
RE: Development/Deployment Questions - by shawn_a - 2015-11-07, 04:57:31



Users browsing this thread: 1 Guest(s)