Thenecho

[shell]简单的shell提示和参数脚本

 该shell脚本有如下点: bash or dash case语句的写法 脚本help写法 参数是否为空的写法 算数运算的写法 #! /bin/bash case "$1" in -h|--help|?) echo "Usage: 1st arg:pin name, 2st arg:reset time" echo "...

jenkins使用ssh remote插件执行shell后无法退出的问题处理

现象:通过jenkins发布代码后,执行远程命令,一直卡在执行远程命令那里打转,无法退出 脚本 #!/bin/bash # 根据参数,执行进程的启动 停止 重启等 #source /etc/profile # 非apache用户运行脚本,则退出 if [ `whoami` != "apache" ];then echo " only apache ca...