1

在官方文档中,AS_IF 宏的描述非常类似于:

Macro: AS_IF (test1, [run-if-true1], ..., [run-if-false]) 

我怎样才能使test1包括几个条件?(“逻辑与”和“逻辑或”的组合)

谢谢

4

1 回答 1

3

test1只是一个 bash 命令。所以它应该用作常规的 bash 代码。例如:

AS_IF ([test "x$a" == "xb" || test "x$a" == "xc"], [echo "test passed"], [echo "test has not passed"]
于 2014-01-09T09:17:31.120 回答