----------------------------------------------------------- #!/usr/bin/perl # use warnings; use strict; # my ($db,$line,$home,$boot,$bkup,$dbName,@dbList,%dbHomeLst,%dbBkupLst,%dbBootLst,%dbLogLst); my $oratab = $ENV{'ORATAB'}; # open OT, "$ENV{'ORATAB'}" or die "Oratab not accessible ($!)"; while (defined ($line = )) { next if $line =~ /^#/; next if $line =~ /^\s*$/; chomp $line; ($dbName, $home, $boot, $bkup) = split ":", $line; push (@dbList,$dbName); print "DBNAME = $dbName\n"; $dbHomeLst{$dbName} = $home; $dbBkupLst{$dbName} = $bkup; $dbBootLst{$dbName} = $boot; $dbLogLst{$dbName} = < $ENV{'DIAG'}/$dbName/log/alert_$dbName.log >; } close OT; # # My Tests # foreach $db (@dbList) { print "Name = $db\n"; print "Home = $dbHomeLst{$db}\n"; print "Bkup = $dbBkupLst{$db}\n"; print "Boot = $dbBootLst{$db}\n"; print "DbLog = $dbLogLst{$db}\n"; } -------------------------------------------------------------