贴一段脚本:
# process/threads/matrix MODE=process # MODE=threads # MODE=matrix #true/false #VIEW=true VIEW=false # <= 4 CHANNELS=2 if [ $MODE == "process" -a $CHANNELS -gt 1 ]; then echo $CHANNELS else ./gh_test $MODE $VIEW $CHANNELS fi
上图中,包含了:
字串比较
数字比较
两个条件 (-a/-o)