I want to create a defaults write command go 2 levels deep, but can't find anything online.
The closest I got was 1 level deep using the -dict switch.
I want to script my OC update, so a lot of people could probably use this method, if I can get it to work, it would be a lot better than swapping the whole file in and out.
for example; defaults write ~/Desktop/config Kernel -dict Emulate -dict Cpuid1Mask -data AAAAAAAAAAAAAACAAAAAAA==
the second use of the -dict doesn't work, but this is what I am trying for...
I've tried just about everything I can think of, but can't get the syntax correct.
Maybe defaults write can't handle it, but I would like to do this with the defaults write command, and not have to install another command line tool.
I want to be able to change these values;
<plist version="1.0">
<dict>
<key>Kernel</key>
<dict>
<key>Emulate</key>
<dict>
<key>Cpuid1Mask</key>
<data>
AAAAAAAAAAAAAAAAAAAAAA==
</data>
</dict>
</dict>
<key>PlatformInfo</key>
<dict>
<key>UpdateSMBIOS</key>
<true/>
</dict>
</dict>
</plist>
If you encode all of it in the plist format you can do this:
If you want to format the plist nicely:
If you're only trying to write the
Kernel
dict:If you want to format the plist nicely: