检查给定的 perforce 标签是否存在

Check given perforce label exists or not

我需要检查给定的标签是否存在于给定的服务器中。

例如:使用 p4 labelsp4 describe 命令或任何其他相关命令的 perforce 服务器中是否存在标签 abc。

一个简单的方法是 p4 labels -e abc。如果标签存在,这将 return 标签,如果不存在,则什么都不存在。