Advertisement
solidsnake

Elisa's Working Shell

Jan 8th, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. echo -n "Enter password: "
  2. read password
  3. until [ "$password" != "abc" ]
  4. do
  5. echo -n "Enter password: "
  6. read password
  7. done
  8. echo -n "Enter ID Number: "
  9. read IDNum
  10. echo -n "Enter Last Name: "
  11. read Last
  12. echo -n "Enter First Name: "
  13. read First
  14. echo -n "Enter Middle Initial: "
  15. read Middle
  16. echo -n "Enter your age: "
  17. read age
  18. luckyNum=$RANDOM
  19. user=$USER
  20. currDate=`date`
  21. directory=`pwd`
  22. echo "DO YOU WANT TO..."
  23. echo "1. Display Student ID, First and Last Names only"
  24. echo "2. Display all captured information"
  25. echo "3. Display terminal-related information only"
  26. echo "4. Display lucky number for today"
  27. echo "5. Enter new set of user information"
  28. echo "6. Exit"
  29. echo -n "Please enter the number of your choice: "
  30. read choice
  31. while [ $choice -ne 6 ]
  32. do
  33. case $choice in
  34. 1)
  35. echo "Student ID: $IDNum"
  36. echo "First Name: $First"
  37. echo "Last Name: $Last"
  38. echo "DO YOU WANT TO..."
  39. echo "1. Display Student ID, First and Last Names only"
  40. echo "2. Display all captured information"
  41. echo "3. Display terminal-related information only"
  42. echo "4. Display lucky number for today"
  43. echo "5. Enter new set of user information"
  44. echo "6. Exit"
  45. echo -n "Please enter the number of your choice: "
  46. read choice;;
  47. 2)
  48. echo "Student ID: $IDNum"
  49. echo "First Name: $First"
  50. echo "Middle Initial: $Middle"
  51. echo "Last Name: $Last"
  52. echo "Age: $age"
  53. echo "DO YOU WANT TO..."
  54. echo "1. Display Student ID, First and Last Names only"
  55. echo "2. Display all captured information"
  56. echo "3. Display terminal-related information only"
  57. echo "4. Display lucky number for today"
  58. echo "5. Enter new set of user information"
  59. echo "6. Exit"
  60. echo -n "Please enter the number of your choice: "
  61. read choice;;
  62. 3)
  63. echo "You are currently loged in as $user and you current directory is $directory"
  64. echo "DO YOU WANT TO..."
  65. echo "1. Display Student ID, First and Last Names only"
  66. echo "2. Display all captured information"
  67. echo "3. Display terminal-related information only"
  68. echo "4. Display lucky number for today"
  69. echo "5. Enter new set of user information"
  70. echo "6. Exit"
  71. echo -n "Please enter the number of your choice: "
  72. read choice;;
  73. 4)
  74. echo "Your lucky number for today $currDate is $luckyNum"
  75. echo "DO YOU WANT TO..."
  76. echo "1. Display Student ID, First and Last Names only"
  77. echo "2. Display all captured information"
  78. echo "3. Display terminal-related information only"
  79. echo "4. Display lucky number for today"
  80. echo "5. Enter new set of user information"
  81. echo "6. Exit"
  82. echo -n "Please enter the number of your choice: "
  83. read choice;;
  84. 5)
  85. echo -n "Enter ID Number: "
  86. read IDNum
  87. echo -n "Enter Last Name: "
  88. read Last
  89. echo -n "Enter First Name: "
  90. read First
  91. echo -n "Enter Middle Initial: "
  92. read Middle
  93. echo -n "Enter your age: "
  94. read age
  95. echo "DO YOU WANT TO..."
  96. echo "1. Display Student ID, First and Last Names only"
  97. echo "2. Display all captured information"
  98. echo "3. Display terminal-related information only"
  99. echo "4. Display lucky number for today"
  100. echo "5. Enter new set of user information"
  101. echo "6. Exit"
  102. echo -n "Please enter the number of your choice: "
  103. read choice;;
  104. 6) ;;
  105. *)
  106. echo -n "Please enter the number of your choice: "
  107. read choice;;
  108. esac
  109. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement