Push bash script

This commit is contained in:
Kenwood 2021-08-17 19:10:20 -04:00
parent fe79a33c9c
commit fd88f66541
1 changed files with 11 additions and 0 deletions

11
scripts/hpe_switch.sh Executable file
View File

@ -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