【问题标题】:Is it possible to chain Powershell commands (logical chain) [duplicate]是否可以链接 Powershell 命令(逻辑链)[重复]
【发布时间】:2020-06-10 16:09:11
【问题描述】:

在 Bash 中,

command1.sh || recover.sh
command2.sh && command3.sh

powershell 是否提供类似的紧凑结构?

我想出的最接近的:

command1.ps1; if ($? -ne 0) { recover.ps1 }
command2.ps1; if ($? -eq 0) { command3.ps1 }

【问题讨论】:

标签: powershell syntax


【解决方案1】:

【讨论】:

  • 现在我只是急切地等待 PS7 工作:(
猜你喜欢
  • 2020-07-19
  • 1970-01-01
  • 1970-01-01
  • 2010-09-19
  • 2012-06-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多