kill, slay, broke: dont pollute environment, use $user
This commit is contained in:
parent
e45c7480b6
commit
4675de1ba0
3 changed files with 6 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
U=`{cat /dev/user}
|
rfork e
|
||||||
if(~ $#* 1){
|
if(~ $#* 1){
|
||||||
U=$1
|
user=$1
|
||||||
}
|
}
|
||||||
ps | sed -n '/^'$U' .* Broken/s%[^ ]* *%~>/proc/%
|
ps | sed -n '/^'$user' .* Broken/s%[^ ]* *%~>/proc/%
|
||||||
s% *.* (.*)%/ctl # \1%
|
s% *.* (.*)%/ctl # \1%
|
||||||
s%~%echo kill%p'
|
s%~%echo kill%p'
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
rfork e
|
rfork e
|
||||||
U=`{cat /dev/user}
|
|
||||||
for(i){
|
for(i){
|
||||||
ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
|
ps | sed -n '/^'$user' .* '$i'$/s%[^ ]* *%~>/proc/%
|
||||||
s% *.* (.*)%/note} # \1%
|
s% *.* (.*)%/note} # \1%
|
||||||
s%~%@{echo kill%p'
|
s%~%@{echo kill%p'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
U=`{cat /dev/user}
|
rfork e
|
||||||
for(i){
|
for(i){
|
||||||
ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
|
ps | sed -n '/^'$user' .* '$i'$/s%[^ ]* *%~>/proc/%
|
||||||
s% *.* (.*)%/ctl} # \1%
|
s% *.* (.*)%/ctl} # \1%
|
||||||
s%~%@{echo kill%p'
|
s%~%@{echo kill%p'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue