Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PowerOff multiple computers
for ip in 50 $(seq 1 154)
do
ping -q -c1 10.10.10.$ip > /dev/null
if [ $? -eq 0 ]
then
ssh user@10.10.10.$ip "poweroff" &
echo "$ip eteint"
else
echo "$ip deja eteinte"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.