Advertisement
Guest User

week6.sh

a guest
Jun 30th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.82 KB | None | 0 0
  1. #
  2. #
  3. #   ********************************************************************
  4. #   *                                                                  *
  5. #   * Week 6 Script Assignment - a basic script to show the # of users *
  6. #   *                            logged in to the student server.      *
  7. #   *                                                                  *
  8. #   ********************************************************************
  9. #
  10. #                              by: bvs245
  11. #
  12. #
  13. echo "let's see how many users are currently logged on to the student server"
  14. #
  15. sleep 2
  16. echo
  17. set `who | wc -l`
  18. users=$1
  19. if [ "$users" -lt 9 ]
  20. then
  21.     echo "There are less than 10 users currently signed on."
  22. elif [ "$users" -lt 11 ]
  23. then
  24.     echo "There are currently "$users" users signed on the server"
  25. fi
  26. #
  27. #
  28. #  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement