This commit is contained in:
2019-02-06 00:49:12 +03:00
commit 8dbb1bb605
4796 changed files with 506072 additions and 0 deletions

21
ljcom/bin/hkill Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/perl
#
# <LJDEP>
# prog: ps, grep
# </LJDEP>
use strict;
my $prog = shift @ARGV;
exit unless ($prog =~ /^[\w\.\/]+$/);
my @procs = `ps awx | grep $prog | grep -v grep | grep -v hkill`;
foreach (@procs)
{
next unless (/^\s*(\d+)\s/);
my $pid = $1;
print $pid, "\n";
kill 1, $pid;
}