0byt3m1n1
Path:
/
data
/
16
/
inventory
/
[
Home
]
File: logfind-start.pl
#!/usr/local/bin/perl $host = `hostname`; chomp($host); $listdir = "/data/16/inventory/INVLISTS"; $host =~ s/vux//; $index = $host; $index = 0 if ($index == 19); exit if ($index > 19); opendir(LISTDIR, $listdir); @DATAFILES = readdir(LISTDIR); closedir(LISTDIR); foreach(@DATAFILES) { $file = $_; $test = "data$index-"; push(@DODATA, $file) if ($file =~ /$test/); } foreach(@DODATA) { $datafile = $_; $datafile = "/data/16/inventory/INVLISTS/$datafile"; chomp($datafile); $script = "/data/16/inventory/bkupandlogfind.pl"; if (! fork) { setpgrp(0,$$); exec ("${script} ${datafile}"); } }