在 MacOS 上获取应用的捆绑标识符(Bundle identifier)
在 MacOS 上,可以使用命令行工具<code>osascript </code>来获取应用程序的 bundle identifier。通过<code>-e</code>选项,可以直接在命令行中输入和执行脚本代码,例如<code>osascript -e 'id of app "Obsidian"'</code>。如果应用程序已安装并正在运行,命令将返回其 bundle identifier,例如<code>md.obsidian</code>;否则可能会返回错误信息。这种方法可以方便地在 MacOS 系统上获取应用程序的捆绑标识符。