0

我正在尝试编写一个脚本来修改 plist 中一些条目的值。该脚本成功更新了第一个条目,然后说在此之后找不到任何条目。下面是代码:

plistFile=/Users/Shared/ACADsysMG/scripts/HKCU.plist
CADsys=/Users/Shared/ACADsysMG
ACADprofile='HKEY_CURRENT_USER.SOFTWARE.AUTODESK.AUTOCAD LT.R19·1.PROFILES.<<UNNAMED PROFILE>>'

    /usr/libexec/plistbuddy -c "Set :'$ACADprofile.GENERAL.TEMPLATEPATH' '$CADsys/templates##########'" $plistFile
    /usr/libexec/plistbuddy -c "Set :'$ACADprofile.GENERAL.QNEWTEMPLATE' '$CADsys/templates/MGstandard.dwt'" '$plistFile'
    /usr/libexec/plistbuddy -c "Set :'$ACADprofile.GENERAL.PRINTERSTYLESHEETDIR' '$CADsys/plot styles'" '$plistFile'
    /usr/libexec/plistbuddy -c "Set :'$ACADprofile.EDITOR CONFIGURATION.EMERGENCYFONT' 'XXXXXXXX'" '$plistFile'

这是输出。请注意第一行有效,但后三行无效。第一行没有错误消息,我已经确认确实进行了修改。我已经检查了一百万次以确保条目存在于 plist

Last login: Wed Jun  6 17:39:43 on ttys000
/Users/Shared/ACADsysMG/scripts/Configure.sh ; exit;
RYANNs-MacBook-Pro:~ jamey$ /Users/Shared/ACADsysMG/scripts/Configure.sh ; exit;
Set: Entry, ":HKEY_CURRENT_USER.SOFTWARE.AUTODESK.AUTOCAD LT.R19·1.PROFILES.<<UNNAMED PROFILE>>.GENERAL.QNEWTEMPLATE", Does Not Exist
Set: Entry, ":HKEY_CURRENT_USER.SOFTWARE.AUTODESK.AUTOCAD LT.R19·1.PROFILES.<<UNNAMED PROFILE>>.GENERAL.PRINTERSTYLESHEETDIR", Does Not Exist
Set: Entry, ":HKEY_CURRENT_USER.SOFTWARE.AUTODESK.AUTOCAD LT.R19·1.PROFILES.<<UNNAMED PROFILE>>.EDITOR CONFIGURATION.EMERGENCYFONT", Does Not Exist
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]
4

0 回答 0