I believe I have this sort of correct. I can print the variables no problem. When passing the vriables to the ups check script nothing happeneds?
#!/usr/bin/perl
open FILE, "upslist.txt";
while ($line=<FILE>){
if ($line=~/^(.*?),(.*?)$/){
#print "ups:$1 string:$2\n";
do 'check_snmp_mgeups-0.1.pl -H $1 -C $2';
}
}
upslist.txt
#ups
ups1.site,upsstring1
ups2.site,upsstring1
ups3.site,upsstring2
ups4.site,upsstring3
Thanks for the help.
upslist.txt?