Push bash script
This commit is contained in:
parent
fe79a33c9c
commit
fd88f66541
|
@ -0,0 +1,11 @@
|
|||
# Written by joe
|
||||
# Usage:
|
||||
# ./hpe_switch.sh <interface> <state>
|
||||
|
||||
if [ $2 = "on" ]; then
|
||||
state=""
|
||||
else
|
||||
state="no"
|
||||
fi
|
||||
|
||||
{ sleep 1; echo -e ""; sleep 1; echo -e "5"; sleep 1; echo -e "config"; sleep 1; echo -e "$state interface $1 power"; sleep 1; echo -e "write memory"; sleep 1; echo -e "exit"; sleep 1; echo -e "exit"; sleep 1; echo -e "y"; } | telnet 10.85.3.96
|
Loading…
Reference in New Issue