init III
This commit is contained in:
22
Perl procurve konfig sichern/exp3.sh
Normal file
22
Perl procurve konfig sichern/exp3.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set USER [lindex $argv 0]
|
||||
set PASSWD [lindex $argv 1]
|
||||
set SSHHOST [lindex $argv 2]
|
||||
set TFTP [lindex $argv 3]
|
||||
set DATE [lindex $argv 4]
|
||||
|
||||
spawn ssh $SSHHOST -l $USER
|
||||
expect "password"
|
||||
send "$PASSWD\r"
|
||||
expect "continue"
|
||||
send "\r"
|
||||
expect "#"
|
||||
send "copy command-output \"show tech\" tftp $TFTP $DATE/$SSHHOST/SH-TECH.txt\r"
|
||||
expect "#"
|
||||
send "logout\r"
|
||||
expect "log out";
|
||||
send "y\r";
|
||||
expect eof
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user