Guest User

Untitled

a guest
Jul 27th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. if [[ "$#" -eq 0 ]]; then
  2. echo "see $0 --help"
  3. exit 0;
  4. fi
  5.  
  6. while [ $# -gt 0 ]; do
  7. case "$1" in
  8. -u)
  9. USERNAME=$2
  10. ;;
  11. -p)
  12. PASSWORD=$2
  13. ;;
  14. -s)
  15. START_TIME=$2
  16. ;;
  17. -e)
  18. END_TIME=$2
  19. ;;
  20. --help)
  21. echo -e "usage: $0 -u userName -p 123pass -s "12:00 am" -e "08:00 am""
  22.  
  23. exit 0
  24. ;;
  25. *)
  26. echo "Invalid argument: $1"
  27. echo "see $0 --help"
  28. exit -1
  29. esac
  30. shift
  31. shift
  32. done
Add Comment
Please, Sign In to add comment