if条件测试语句 单分支结构 if ;then 执行操作 fi 示例: #!/bin/bash DIR="/tmp/test" if ; then mkdir -p $DIR fi 双分支结构 if ;then 执行操作 else 执行操作 fi 示例: #!/bin/bash # ping 3 次,每次间隔
topcpu.sh #!/bin/bash # @Function # TOP CPU Thread INFO. # # # PROG=`basename $0` usage() { cat <<EOF Usage: ${PROG} ... Java top cpu print the stack of these threads. Example: ${PROG} -