How to update AMM script with command line

Moderator: xyloweb

How to update AMM script with command line

Postby xyloweb » Tue Nov 30, 2010 4:05 pm

Suppose I update my server name 'vega.stga.dom' with new name 'aldebaran.stga.dom' and I want to update my script with a command line.

1) open Terminal.app,
2) go to the folder where is your script file
3) and do this :

plutil -convert xml1 "my_ammscript.amsf" -o - | sed s/vega.stga.dom/aldebaran.stga.dom/g | plutil -convert binary1 -o "my_ammscript.amsf" -


To see the result :
open -a "Property List Editor" my_ammscript.amsf


with 10.4.11 use
plutil -convert xml1 "my_ammscript.amsf"
sed -i .old s/vega.stga.dom/aldebaran.stga.dom/g "my_ammscript.amsf"
plutil -convert binary1 "my_ammscript.amsf"
User avatar
xyloweb
 
Posts: 6
Joined: Wed Nov 03, 2010 9:57 pm

Return to How To

Who is online

Users browsing this forum: No registered users and 4 guests

cron