X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=dell-switch.pl;h=158c8e46c18ae579ab0c923115409bc661ea27e5;hb=7511a1dc3f70bc37d2197dff5ef26752bc6c1bb9;hp=a4fc2bbf705f0562b8b9c728bbc73df787fb76c6;hpb=67acb51894108f7c095cefd1f4603b8468f5a8aa;p=dell-switch 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}{} ) { }