#!/bin/bash#test1.shcase $1 instart)echo "Your type is start";;stop)echo "Your type is stop";;reload)echo "Your type is reload";;*)echo "Your should type start or stop or reload";;esac......【阅读全文】
#!/bin/bashcat aaa.bbbif[ $? = 0 ];thenecho "The return value is zero"elseecho "It's wrong"fi解释: 之前执行一条命令cat aaa.bbb.如果这条命令成功执行,并且命令没有报错,并且执行完成的话。那么会继续执行下一条命令。......【阅读全文】