Advertisement
Guest User

Untitled

a guest
Feb 25th, 2022
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. while read host; do
  4.         while true; do
  5.                 wget -O /dev/null -o /dev/null $host &
  6.                 sleep 2;
  7.                 pidWget=$!;
  8.                 if ps -p $pidWget > /dev/null; then
  9.                         kill $pidWget;
  10.                 fi
  11.                 echo 'Do'
  12.         done &
  13. done < hosts
  14.  
  15. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement