Guest User

Untitled

a guest
Nov 27th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo -n "Username: "
  4. read USERNAME
  5.  
  6. SORIG=`stty -g`
  7. stty -echo
  8. echo -n "Password: "
  9. read PASSWORD
  10. stty $SORIG
  11.  
  12. #
  13. # PARAMETERS
  14. #
  15. ARRARGS=$@
  16.  
  17. clear
  18. echo "Running commands on the following:"
  19. for strArg in "$@"; do
  20. echo $strArg
  21. done
  22.  
  23. echo -n "Is this correct? (y/n): "
  24. read ANSWER
  25.  
  26. if [ "$ANSWER" != "y" ]; then
  27. echo "Exiting..."
  28. exit
  29. fi
  30.  
  31. #
  32. # RUN
  33. #
  34. for IP in "$@"
  35. do
  36. ./commands.sh "$USERNAME" "$IP" "$PASSWORD"
  37. done
Add Comment
Please, Sign In to add comment