直接看代码 ps aux|grep upload2FTP.sh|grep -v "grep"|awk '{print $2}' 其中awk指定输出第二列内容(centos对应进程号) 转载于:https://www.cnblogs.com/zhscn/p/7373510.html