How to kill session by keywords?
2013-10-10 11:38
218 查看
keywords="install"
session_list=
for session in ${session_list[*]}
do
kill -9 $session
if [ $? != 0 ];then
echo kill $session successfully
else
echo kill $session failed
fi
done
session_list=
ps -ef | grep "${keywords}" | awk '{print $2}'
for session in ${session_list[*]}
do
kill -9 $session
if [ $? != 0 ];then
echo kill $session successfully
else
echo kill $session failed
fi
done
相关文章推荐
- How to identify a session started by a remote distributed transaction? (文档 ID 332326.1)
- Hack Like a Pro: How to Kill and Disable Antivirus Software on a Remote PC
- How to avoid Excel from prompting "The file you are trying to open, , is in a different format than specified by the file extension"? (转)
- How to handle Side-by-Side Configuration Incorrect
- How To Become a Better Programmer by Not Programming
- How To Debug Android By Adb
- How to create and apply patch by GIT
- How to open the dialog out of iframe by using jquery dialog
- How to run Control Panel tools by typing a command
- How to Capture the Integer-Divide-By-Zero Error in C++(提前定义信号)
- How to fix 'Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions'
- How to nagivate to a list item by site id, web id,list id and item id.
- Xshell--How_to_import_SecureCRT_session
- logstash 如何处理 mongodb 导出来的 _id value数据。 how to custom fields of logstash by mongo mapreduce exported data.(example format: {_id:"xxx"} , value:{})
- Targeted Resumes How to Write a Targeted Resume By Alison Doyle
- how to install plugins by widget way
- virtual memory layout and how to get it by the correspoinding functuon
- How to send sms by .net
- Unable to find interceptor class referenced by ref-name token-session - interceptor-ref
- Howto Sharepoint Enable Session State if not enabled