BASH   87
pingstats bash
Guest on 16th March 2023 12:18:11 AM


  1. #!/bin/bash
  2.  
  3. #
  4. # send a SIGQUIT to all the pings currently running, causing them to
  5. # dump their statistics
  6. #
  7.  
  8. for each in `ps aux | grep " ping " | grep -v grep | awk '{print $2}'`; do
  9.     kill -QUIT $each;
  10. done;

Raw Paste

Login or Register to edit or fork this paste. It's free.