小编bun*_*nny的帖子

如果在 Linux shell 脚本中第一个条件为真,如何执行第二个条件

我有一个if条件。如果该条件为真,则将运行一个脚本,然后我需要检查另一个条件。

我怎样才能使用if语句或其他东西来做到这一点?

例如,

 if [ condition -eq o ]
 then
 run script
 again condition(this condition depends on above script output value)
 run another script
 else
 exit
Run Code Online (Sandbox Code Playgroud)

linux script bash shell

3
推荐指数
1
解决办法
5060
查看次数

标签 统计

bash ×1

linux ×1

script ×1

shell ×1