in reply to Re^3: Search and delete
in thread Search and delete
my %unitMap; my $cmd = "hpacucli ctrl slot=0 pd all show";; open my $fd, "$cmd|" or return \%unitMap; while (my $row = <$fd>) { $row =~ /^$/ and next; $row =~ s/[,|)|(]//g; chomp $row; next if $row =~ /^Smart/g; $row =~ s/^\s+//; next if $row =~ /^unassigned\n\nOK$/; # I am trying to delete the line that starts with unassigned and 2 lin +es after that print "$row\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Search and delete
by james28909 (Deacon) on Dec 16, 2014 at 01:25 UTC | |
|
Re^5: Search and delete
by Anonymous Monk on Dec 16, 2014 at 00:00 UTC | |
by pr33 (Scribe) on Dec 16, 2014 at 00:06 UTC | |
by GotToBTru (Prior) on Dec 16, 2014 at 01:26 UTC | |
by pr33 (Scribe) on Dec 16, 2014 at 00:07 UTC |