#!/bin/perl system "tcpdump -i bge1 -s0 -w /tmp/file.out -C 1"; sleep 2; while(true){
@array1 = `ls -l /tmp | grep files`;
$result=@array1+1;
if ($result > 3){
$x=`ps -ef | awk '/tcpdump/ && !/awk/ {print $2}'`;
@y=split(' ', $x);
$c=$y[1];
system "kill -9 $c";
print "killing tcpdump...";
}else{
print "!!!\n";
exit;
}
exit;
}