在 MacOS 上获取应用的捆绑标识符(Bundle identifier)
在 MacOS 上,使用命令行工具<code>osascript</code>可以直接获取应用程序的 bundle identifier,例如:<code>osascript -e 'id of app "Obsidian"'。</code>Bundle identifier是一个唯一的字符串,用于标识应用程序,通常格式为<code>com.companyname.appname</code>。该命令会返回指定应用程序的 bundle identifier,如果应用程序不存在或未运行,则可能返回错误信息。