Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. #
  3. spinner(){
  4.     PROC=$1
  5.     BANNER=$2
  6.     while kill -0 "$PROC" >/dev/null 2>&1; do
  7.         echo -ne "$BANNER"
  8.         sleep 0.05
  9.     done
  10.     echo "$BANNER - DONE"
  11.     return 0
  12. }
  13.  
  14. ifconfig mon down &
  15. spinner "$!" $"Taking mon0 down..."
  16.  
  17. echo
  18. ifconfig mon0 up &
  19. spinner "$!" $"Putting mon0 up..."
  20.  
  21. echo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement