##编写shell脚本
#!/bin/bash
arr=(“zhangsan” “lisi” “wangwu”)
for i in “${arr[@]}”
do
process=ps -ef|grep ${i}| grep -v "grep"| awk '{print $2}'
kill -9 ${process}
done
##每日定时杀手动启动的进程
0 19 * * * cd /kill_process && sh kill_process.sh
2024-04-18 07:46:01
##编写shell脚本
#!/bin/bash
arr=(“zhangsan” “lisi” “wangwu”)
for i in “${arr[@]}”
do
process=ps -ef|grep ${i}| grep -v "grep"| awk '{print $2}'
kill -9 ${process}
done
##每日定时杀手动启动的进程
0 19 * * * cd /kill_process && sh kill_process.sh