In BASH, how do I use defaults write on a plist for a existing element in an array?
问题 I want to change the value of DEFAULT_VALUE_PLACEHOLDER in the following plist using the command line tool defaults <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PreferenceSpecifiers</key> <array> <dict> <key>DefaultValue</key> <string>DEFAULT_VALUE_PLACEHOLDER</string> <key>Type</key> <string>PSTitleValueSpecifier</string> <key>Title</key> <string>Version</string>