[lsappinfo] kLSBundleIdentifierLowerCaseKey 小文字のバンドルID
サンプルコード
行番号 | ソース |
---|---|
001 | #!/bin/bash |
002 | #com.cocolog-nifty.quicktimer.icefloe |
003 | # |
004 | ################################################# |
005 | STR_BUNDLEID="COM.MICROSOFT.EDGEMAC" |
006 | STR_BUNDLEID_LOWCASE=$(/bin/echo "$STR_BUNDLEID" | tr '[:upper:]' '[:lower:]') |
007 | /bin/echo "LowCase小文字のバンドルID: ${STR_BUNDLEID_LOWCASE}" |
008 | |
009 | STR_CNT=$(/usr/bin/lsappinfo | grep -Eo '[0-9]+) "[^"]+" ASN:[^ ]+' | wc -l) |
010 | /bin/echo "総プロセス数は${STR_CNT}" |
011 | |
012 | STR_CNT=$(/usr/bin/lsappinfo find kLSBundleIdentifierLowerCaseKey="$STR_BUNDLEID_LOWCASE" | grep -o ASN: | wc -l) |
013 | /bin/echo "${STR_BUNDLEID_LOWCASE} のプロセス数は${STR_CNT}" |
014 | |
015 | if [ "$STR_CNT" -gt 0 ] ; then |
016 | STR_RESPONSE=$(/usr/bin/lsappinfo find kLSBundleIdentifierLowerCaseKey="$STR_BUNDLEID_LOWCASE") |
017 | /bin/echo "" |
018 | /bin/echo "■ kLSBundleIdentifierLowerCaseKey プロセス一覧" |
019 | /bin/echo "$STR_RESPONSE" | sed 's/": ASN:/": \nASN:/g' |
020 | fi |
021 | |
022 | exit 0 |
023 | |
024 | |
025 | kCFBundleNameKey |
026 | kLSASNKey |
027 | kLSASNToBringForwardAtNextApplicationExitKey |
028 | kLSAllowedToBecomeFrontmostKey |
029 | kLSApplicationBackgroundOnlyTypeKey |
030 | kLSApplicationBackgroundPriorityKey |
031 | kLSApplicationCountKey |
032 | kLSApplicationDesiresAttentionKey |
033 | kLSApplicationForegroundPriorityKey |
034 | kLSApplicationForegroundTypeKey |
035 | kLSApplicationHasRegisteredKey |
036 | kLSApplicationHasSignalledItIsReadyKey |
037 | kLSApplicationInStoppedStateKey |
038 | kLSApplicationInThrottledStateAfterLaunchKey |
039 | kLSApplicationInformationSeedKey |
040 | kLSApplicationIsHiddenKey |
041 | kLSApplicationListSeedKey |
042 | kLSApplicationReadyToBeFrontableKey |
043 | kLSApplicationTypeKey |
044 | kLSApplicationTypeToRestoreKey |
045 | kLSApplicationUIElementTypeKey |
046 | kLSApplicationVersionKey |
047 | kLSApplicationWasTerminatedByTALKey |
048 | kLSApplicationWouldBeTerminatedByTALKey |
049 | kLSArchitectureKey |
050 | kLSBundleIdentifierLowerCaseKey |
051 | kLSBundlePathDeviceIDKey |
052 | kLSBundlePathINodeKey |
053 | kLSBundlePathKey |
054 | kLSCheckInTimeKey |
055 | kLSDebugLevelKey |
056 | kLSDisplayNameKey |
057 | kLSExecutableFormatCFMKey |
058 | kLSExecutableFormatKey |
059 | kLSExecutableFormatMachOKey |
060 | kLSExecutableFormatPoundBangKey |
061 | kLSExecutablePathDeviceIDKey |
062 | kLSExecutablePathINodeKey |
063 | kLSExecutablePathKey |
064 | kLSExitStatusKey |
065 | kLSFileCreatorKey |
066 | kLSFileTypeKey |
067 | kLSFlavorKey |
068 | kLSFrontApplicationSeedKey |
069 | kLSHiddenApplicationCountKey |
070 | kLSLaunchTimeKey |
071 | kLSLaunchedByLaunchServicesKey |
072 | kLSLaunchedByLaunchServicesThruForkExecKey |
073 | kLSLaunchedByLaunchServicesThruLaunchDKey |
074 | kLSLaunchedByLaunchServicesThruSessionLauncherKey |
075 | kLSLaunchedInQuarantineKey |
076 | kLSMenuBarOwnerApplicationSeedKey |
077 | kLSModifierLaunchedForPersistenceKey |
078 | kLSModifierRefConKey |
079 | kLSNotifyBecameFrontmostAnotherLaunchKey |
080 | kLSNotifyBecameFrontmostFirstActivationKey |
081 | kLSNotifyLaunchRequestLaunchModifiersKey |
082 | kLSOriginalExecutablePathDeviceIDKey |
083 | kLSOriginalExecutablePathINodeKey |
084 | kLSOriginalExecutablePathKey |
085 | kLSOriginalPIDKey |
086 | kLSPIDKey |
087 | kLSParentASNKey |
088 | kLSParentASNWasInferredKey |
089 | kLSPersistenceSuppressRelaunchAtLoginKey |
090 | kLSPreviousASNKey |
091 | kLSPreviousPresentationModeKey |
092 | kLSPreviousValueKey |
093 | kLSRecordingAppleEventsKey |
094 | kLSRequiresCarbonKey |
095 | kLSSessionIDKey |
096 | kLSShellExecutablePathKey |
097 | kLSUIDsInSessionKey |
098 | kLSUIPresentationModeAllHiddenValue |
099 | kLSUIPresentationModeAllSuppressedValue |
100 | kLSUIPresentationModeContentHiddenValue |
101 | kLSUIPresentationModeContentSuppressedValue |
102 | kLSUIPresentationModeKey |
103 | kLSUIPresentationModeNormalValue |
104 | kLSUIPresentationOptionsKey |
105 | kLSUnhiddenApplicationCountKey |
106 | kLSVisibleApplicationCountKey |
107 | kLSVisibleApplicationListSeedKey |
108 | kLSWantsToComeForwardAtRegistrationTimeKey |
109 | launchedThrottled |
110 | |
111 | |
112 | |
113 | applicationtype |
114 | arch |
115 | asn |
116 | bundleid |
117 | bundlelastcomponent |
118 | bundlename |
119 | bundlenamelc |
120 | bundlepath |
121 | changecount |
122 | creator |
123 | debuglevel |
124 | displayname |
125 | execpath |
126 | executablepath |
127 | filecreator |
128 | filename |
129 | filetype |
130 | hidden |
131 | isconnectedtowindowserver |
132 | isready |
133 | isregistered |
134 | isstopped |
135 | isthrottled |
136 | launchedForPersistence |
137 | launchedinquarantine |
138 | name |
139 | parentasn |
140 | pid |
141 | presentationmode |
142 | presentationoptions |
143 | psn |
144 | recordingAppleEvents |
145 | session |
146 | shellpath |
147 | supressRelaunch |
148 | version |
AppleScriptで生成しました |
| 固定リンク