在 MacOS 上获取应用的捆绑标识符(Bundle identifier)
在 MacOS 上,可以使用<code>osascript</code>命令行工具通过<code>-e</code>选项获取应用程序的 bundle identifier(捆绑标识符)。这个标识符是一个唯一的字符串,格式通常为<code>com.companyname.appname</code>。通过命令<code>osascript -e 'id of app "Obsidian"'</code>可以获取名为"Obsidian"应用程序的 bundle identifier。如果该应用程序未安装或未运行,命令可能返回错误信息。