projects
/
dell-switch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcb8c1c
)
fix hostname extraction
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 3 Apr 2022 18:44:53 +0000
(20:44 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 3 Apr 2022 18:44:53 +0000
(20:44 +0200)
dell-switch.pl
patch
|
blob
|
history
diff --git
a/dell-switch.pl
b/dell-switch.pl
index
3246fc1
..
3c990c8
100755
(executable)
--- 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/([\w\-\(\)]+)#$/ ) {
+ } elsif ( $buff =~ m/
[\n\r]
([\w\-\(\)]+)#$/ ) {
my $hostname = $1;
if ( $buff ) {
save_log $ip, $hostname, $command, $buff;