#!/usr/bin/perl
#
#  @author ais
#  @edited eechan
#
$command = "runLooperAll.sh";
$command1 = "java";
$command2 = "runAccountAll.sh";
$username = $ENV{USER};

@pid_lines = (`ps aux | grep $command`);

foreach $i (@pid_lines) {
  @a = split(" ",$i);
  print "kill -9 $a[1]\n";
  system("kill -9 $a[1]");
}

@pid_lines1 = (`ps aux | grep $command1`);

foreach $i (@pid_lines1) {
  @a = split(" ",$i);
  print "kill -9 $a[1]\n";
  system("kill -9 $a[1]");
}


@pid_lines1 = (`ps aux | grep $command2`);

foreach $i (@pid_lines1) {
  @a = split(" ",$i);
  print "kill -9 $a[1]\n";
  system("kill -9 $a[1]");
}
exit(0);
