plistの内容を印刷するためのシェルユーティリティはありますか?脱獄されたiOSデバイスを好みますか?

plistの内容を印刷するためのシェルユーティリティはありますか?脱獄されたiOSデバイスを好みますか?

plistファイルから実際のテキストを印刷するツールが必要です(plutilはフォーマットを変更し、catは横説説を印刷し、iOSにはデフォルトのコマンドはありません)。スクリプトに存在する必要があるため、テキストエディタは機能しません。

これが私が必要な理由です:

apps="$(find /var/mobile/Applications -name "Info.plist" | grep "\.app/Info\.plist")"
mkdir /var/mobile/rmnames
for app in $apps; do 
    newplist="$(echo $app | sed 's|/var/mobile/Applications/[^/]*/||' | sed 's|\.app/Info\.plist|.txt|')"
    #1# $app | sed 's|<string>#2#</string>|<string></string>|' > "/var/mobile/rmnames/"$newplist
    mv "/var/mobile/rmnames/"$newplist $app 
done
rm -rf /var/mobile/rmnames

私がやりたいことは、手動で行う必要なしにSpringboardからすべてのApp Storeアプリ名を削除することです。ここで、「#1#」は plist 印刷ユーティリティであり、「#2#」は CFBundleDisplayName の検索に使用される正規表現です。

そして、なぜ私がCydiaを修正しないのか疑問に思うなら、私はモバイルボードを軽蔑します。

私が意味する横説説の例:

mobile:Flixster.app> cat Info.plist
bplist00?#


!"#$%&'()*+,(4567(9:;    <=>CDEVWXY[\]^_bc_CFBundleSignatureYDTSDKName_DTPlatformBuild_BuildMachineOSBuil  d_UIPrerenderedIcon_MedialetsUseTestServers_CFShortVersionString_CFBundleExecuta  ble_CFBundleIconFiles_LSRequiresIPhoneOS]NSMainNibFile^MedialetsAppID_CFBundlePackageTypeZDTSDKBuild_UIRequiresPersistentWiFi\DTXcodeBuild_NSMainNibFile~ipad_CFBundleResourceSpecificationZDTCompiler_CFBundleDisplayName_%UISupportedInterfaceOrientations~ipad_CFBundleDevelopmentRegion^DTPlatformName_CFBundleURLTypes\CFBundleName_CFBundleVersion_DTPlatformVersion_CFBundleSupportedPlatformsWDTXcode_FLXReleaseCandidate_MinimumOSVersion_CFBundleIdentifier^UIDeviceFamily_CFBundleIconFile_CFBundleInfoDictionaryVersionT????[iphoneos5.0U9A334V10K549 T5.20XFlixster?-./012XIcon.png[[email protected][Icon-72.png_Icon-Small-50.png^[email protected]    ZMainWindow_(83e69fab771f958d7de70ada6ba32ff334b9eec1TAPPLU9A334    U4C199_MainWindow-iPad_ResourceRules.plist_com.apple.compilers.llvmgcc42P??@AB_#UIInterfaceOrientationLandscapeLeft_$UIInterfaceOrientationLandscapeRight_UIInterfaceOrientationPortrait_(UIInterfaceOrientationPortraitUpsideDownUen_USXiphoneos?F?GHIJ_CFBundleURLName_CFBundleURLSchemes_com.jeffreygrossman.moviesapp?  KLMNOPQRSTUXflixster\fb2558160538\fb2373897986\fb2446021478]fb55312797380\fb5769  273609\fb2352444510\fb2451978556]fb16478767641]fb87604592406\fb2532675812XFlixst  erT5.20S5.0?ZXiPhoneOST0420R10S4.0_com.jeffreygrossman.moviesapp? `aXIcon.pngS6.Qeo??????(7MXs??????)<I[o???????%+2349BIR^j~?????????? 238^????????.:CP]┘│??????????????!␍%└⎺␉␋┌␊:F┌␋│⎽├␊⎼.▒⎻⎻> 

ベストアンサー1

これを使用して、fileplist 型とバイナリかどうかを確認できます。

 plutil -convert xml1 $file && sed /*whatever*/  $file && plutil -convert binary1 $file

それ以外の場合は、もちろんsedxmlファイル(またはPerl)で直接使用することもできます。

おすすめ記事