Build step 'Execute shell' marked build as failure

shell 脚本远程调用执行如下:
/usr/bin/ssh 10.1.2.3 '/bin/bash /root/ReServer.sh'
报错如下:
Build step 'Execute shell' marked build as failure

本地执行是ok,怎么执行都报错,后来折腾了老半天,一步一步的打输出,发现:
Build step 'Execute shell' marked build as failure
原来是脚本在判断进程是否存在的同时,这个结束进程刚好有同样的匹配串!
ps -aux | grep "idiot" | grep -v grep | grep -v '$$' | awk '{print $2}'
所以修改idiot,做精确匹配解决"sb idiot"

猜你喜欢

转载自blog.51cto.com/ckl893/2446413