在 MacOS 上获取应用的捆绑标识符(Bundle identifier)
在 MacOS 上,使用 <code>osascript</code> 命令行工具可以通过<code>-e</code>选项执行脚本代码,例如通过<code>osascript -e 'id of app "Obsidian"'</code>来获取应用程序的 bundle identifier。Bundle identifier 是一个唯一的字符串,一般格式为<code>com.companyname.appname</code>。如果应用程序已安装并运行,该命令将返回其 bundle identifier,否则可能返回错误信息。