Thread Prüfen, ob alle Dateien existieren
(1 answers)
Opened by Shaq17 at 2015-07-06 13:11
Einfach so mit einem Hash "zählen":
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 my @list_UST = ( "192.168.17.4", "11.255.22.1", "10.256.17.13" ); my %found; for my $ip (@list_UST) { $found{$ip} = glob("*_${ip}_*.log"); } say "Gefunden: ", join ",", grep { $found{$_} } sort keys %found; say "Fehlend: ", join ",", grep { !$found{$_} } sort keys %found; Last edited: 2015-07-06 14:28:24 +0200 (CEST) |