0
현재 사용자가 iCloud Documents를 사용할 수있는 경우 Mac 컴퓨터에서 찾으려고합니다. 이 위치에있는 plist (MobileMeAccounts.plist)를 찾았지만 사용 가능 여부를 식별 할 수있는 스크립트를 만드는 데 도움이 될 수 있습니다.plist 파일에서 여러 문자열을 찾을 수있는 스크립트
내가 특별히 다음과 같은 코드를 찾고 있어요 사실 일 수 있습니다 : 여기
<key>Enabled</key>
<true/>
는 PLIST입니다. 아래로 스크롤하면 활성화 된 "MOBILE_DOCUMENTS"가 표시됩니다.
<?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>Accounts</key>
<array>
<dict>
<key>AccountAlternateDSID</key>
<string>99999999</string>
<key>AccountDSID</key>
<string>999999</string>
<key>AccountDescription</key>
<string>iCloud</string>
<key>AccountID</key>
<string>*****@gmail.com</string>
<key>AccountUUID</key>
<string>9999999</string>
<key>DisplayName</key>
<string>User Name</string>
<key>LoggedIn</key>
<true/>
<key>Services</key>
<array>
<dict>
<key>Name</key>
<string>CLOUDDESKTOP</string>
<key>ServiceID</key>
<string>com.apple.Dataclass.CloudDesktop</string>
<key>status</key>
<string>active</string>
</dict>
<dict>
<key>Name</key>
<string>FAMILY</string>
<key>ServiceID</key>
<string>com.apple.Dataclass.Family</string>
<key>showManageFamily</key>
<true/>
</dict>
<dict>
<key>Enabled</key>
<true/>
<key>Name</key>
<string>MOBILE_DOCUMENTS</string>
<key>ServiceID</key>
<string>com.apple.Dataclass.Ubiquity</string>
<key>apsEnv</key>
<string>production</string>
<key>authMechanism</key>
<string>token</string>
<key>url</key>
<string>https://p48-ubiquity.icloud.com:443</string>
<key>wsUrl</key>
<string>https://p48-ubiquityws.icloud.com:443</string>
</dict>
파일이 잘 렸습니다 !! awk는 xml을 분석하는 데 가장 좋은 도구가 아닙니다. –
잡기에 감사드립니다! 나는이 정보를 파싱 할 수있는 방법을 공개한다. awk 일 필요는 없습니다. 감사. – Dan