./ips | xargs -i ./dell-switch.pl {} "show system"
+
+Backup switch configuration to tftp server:
+
+./ips 1,2 | awk '{ print "./dell-switch.pl "$1" \"copy startup-config tftp://10.20.0.253/backups/"$2".config\"" }' | NO_LOG=1 sh -x
+
} elsif ( $buff =~ m{\QOverwrite file [startup-config] ?[Yes/press any key for no]....\E} ) {
send_pty "y";
$buff = '';
+ } elsif ( $buff =~ s{Management access will be blocked for the duration of the transfer.*Are you sure you want to start\? \(y/n\) }{}s ) {
+ send_pty 'y';
}
}