#!/usr/bin/perl

@output = `ps -aux | grep condor`;

foreach $process (@output) {
	@columns = split(/\s+/, $process);
	$owner = @columns[0];
	$pid = @columns[1];
	$process = "@columns[10..$#columns]";

	if (($process ne 'grep condor') &&
		($process ne 'ps -aux') &&
		($process !~/ssh/) &&
		($process !~/bash/) &&
		($process !~/tcsh/)) {
			print "$process ($pid : $owner)\n";
			$output = `kill $pid`;
			print "$output\n";
		}

}
