killer also shows the process

This commit is contained in:
q
2017-08-21 13:40:58 +03:00
parent 2da190e033
commit 161aed8694
2 changed files with 5 additions and 3 deletions

View File

@@ -1,10 +1,10 @@
#!/bin/bash
#sleep 1
#sbl-disp 3
# display-setup 3
# Do something if at Univ network
#if ping ad.helsinki.fi -c 2; then
#if ping a.local.computer -c 2; then
# true
#fi

View File

@@ -102,7 +102,9 @@ function run_command() {
}
function ask_to_kill() {
printf "${colRow}\nPID: $1\n k kill\n t terminate${colZ}\n"
printf "${colRow}"
ps -o pid,bsdstart,args "$1"
printf "\n k kill\n t terminate${colZ}\n"
read -t 600 input2
[[ "$input2" = "k" ]] && kill $1
[[ "$input2" = "t" ]] && kill -9 $1