From 7511a1dc3f70bc37d2197dff5ef26752bc6c1bb9 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 21 Sep 2015 17:54:35 +0200 Subject: [PATCH] fix more prompt for PowerConnect 5548 --- dell-switch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dell-switch.pl b/dell-switch.pl index a4fc2bb..158c8e4 100755 --- a/dell-switch.pl +++ b/dell-switch.pl @@ -15,7 +15,7 @@ require 'config.pl'; #$Net::OpenSSH::debug = ~0; -my $ip = shift @ARGV || '10.20.0.2'; +my $ip = shift @ARGV || die "usage: $0 IP command[ command ...]\n"; my @commands = @ARGV; @commands = unless @commands; @@ -87,7 +87,7 @@ while(1) { } } elsif ( $buff =~ m/% Unrecognized command/ ) { exit 1; - } elsif ( $buff =~ s{More: , Quit: q, One line: }{} ) { + } elsif ( $buff =~ s{More: , Quit: q.*One line: }{} ) { send_pty " "; } elsif ( $buff =~ s{\e\[0m\r\s+\r}{} ) { } -- 2.20.1