是否可以编写一个批处理脚本来检查自这个版本排队以来是否没有添加任何版本,如果是,则运行更新的脚本。
我可以通过编写子脚本来做到这一点,但这意味着我为每个脚本准备了 2 个脚本。
感谢您的帮助。
最佳答案
f$environment 和 f$search 是您可能想要使用的词法函数。我的示例删除了带有 f$extract 的版本,但您可能想要使用 f$parse。
$ this = f$environment("PROCEDURE")
$ write sys$output "This is ", this
$ noversion = f$extract (0,f$locate(";",this),this)
$ write sys$output "without version it is ", noversion
$ latest = f$search (noversion)
$ write sys$output "latest version is ", latest
$ if this .nes. latest -
then $ write sys$output "There is a new version!"
关于OpenVMS - 批处理以检查是否运行最新版本的脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23387501/