在bash中如何使这样的结构工作:
if (cp /folder/path /to/path) && (cp /anotherfolder/path /to/anotherpath) then echo "Succeeded" else echo "Failed" fi
if应该测试$?返回每个命令的代码并用&&绑定它们.
我怎样才能在Bash中做到这一点?
linux bash shell
bash ×1
linux ×1
shell ×1