#!/usr/bin/perl -w # # cat data obtained from collector script use strict; my $pid = `pgrep -f _collectDataScript.pl`; if ($pid) { while($pid) { print "Waiting for process $pid"; sleep(10); my $pid = `pgrep -f _collectDataScript.pl`; if ($pid !~ m/\d+/) { print "process id is non-numeric\n"; last; } } } print "process finished...do something\n";