shell执行命令时,判断没有相同进程再执行,常用于定时任务
if ! ps aux | grep -v grep | grep -q "msg run"; then msg run; fi
#测试
if ! ps aux | grep -v grep | grep -q "msg run"; then echo msg run; fi版权属于:Joyber
本文链接:https://blog.qqvbc.com/default/1350.html
转载时须注明出处及本声明
if ! ps aux | grep -v grep | grep -q "msg run"; then msg run; fi
#测试
if ! ps aux | grep -v grep | grep -q "msg run"; then echo msg run; fi版权属于:Joyber
本文链接:https://blog.qqvbc.com/default/1350.html
转载时须注明出处及本声明