在 MacOS 上获取应用的捆绑标识符(Bundle identifier)
在 MacOS 上,使用 <code>osascript</code> 命令行工具可以通过 <code>-e</code> 选项执行脚本代码,获取应用程序的 bundle identifier。Bundle identifier 是唯一标识一个应用程序的字符串,类似于反向域名格式。通过命令 <code>osascript -e 'id of app "Obsidian"'</code> 可以获取名为 "Obsidian" 应用的 bundle identifier,例如 <code>md.obsidian</code>。如果应用未安装或运行,命令可能返回错误信息。