1 2 3 4 5
my @ente = map { "\/dev\/sd$_" } ('x', 'y', 'z'); foreach my $h (@ente) { my $output = "smartctl \-l ssd $h| grep Percent | cut \-c 29,30 "; }
1 2 3 4 5 6 7 8
foreach my $h (@ente) { my $output = `smartctl \-l ssd $h| grep Percent | cut \-c 29,30 `; # .... weitere Kommandos .... if ($output > 89) { exit(2); } }
1
2
3
4
my @ente = map { "\/dev\/sd$_" } ('x', 'y', 'z');
foreach my $h (@ente) {
my $output = "smartctl \-l ssd $h| grep Percent | cut \-c 29,30 ";
1
2
my $output = "smartctl \-l ssd $h| grep Percent | cut \-c 29,30 ";
print "$output $h", "\n";