Build custom columns support with Makefile
[git-cheetah/kirill.git] / kill-explorer.sh
blobb2412464a7943304b08fe31ed0adc97257e38791
1 #!/bin/sh
3 ps -W | grep -e \\\\explorer.exe$ -e \\\\taskmgr.exe$ > /tmp/killtasks.txt
5 echo
6 cat /tmp/killtasks.txt
7 echo
8 echo "Okay to kill? If not, ^C"
9 read answer
11 pids=$(cat /tmp/killtasks.txt | sed -n "s/^[^0-9]*\([0-9][0-9]*\).*$/\1/p")
12 for p in $pids
14 echo taskkill //f //pid $p
15 taskkill //f //pid $p
16 done
18 /c/WINDOWS/explorer &
19 sleep 2
20 /c/WINDOWS/system32/taskmgr &