From: Dobrica Pavlinusic Date: Sun, 3 Apr 2022 19:45:56 +0000 (+0200) Subject: remove empty last command X-Git-Url: http://git.rot13.org/?p=dell-switch;a=commitdiff_plain;h=8656829ea0b6304fe634926be2f54535eb0c9cfd remove empty last command --- diff --git a/dell-switch.pl b/dell-switch.pl index 3c990c8..6ca957b 100755 --- a/dell-switch.pl +++ b/dell-switch.pl @@ -99,7 +99,7 @@ while() { } elsif ( $buff =~ m/Password:/ ) { send_pty "$passwd\n"; $buff = ''; - } elsif ( $buff =~ m/[\n\r]([\w\-\(\)]+)#$/ ) { + } elsif ( $buff =~ m/[\n\r\b]([\w\-\(\)]+)#\s*$/ ) { my $hostname = $1; if ( $buff ) { save_log $ip, $hostname, $command, $buff; @@ -146,4 +146,3 @@ show vlan show running-config show bridge address show interfaces status -