Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo -n "Enter password: "
- read password
- until [ "$password" != "abc" ]
- do
- echo -n "Enter password: "
- read password
- done
- echo -n "Enter ID Number: "
- read IDNum
- echo -n "Enter Last Name: "
- read Last
- echo -n "Enter First Name: "
- read First
- echo -n "Enter Middle Initial: "
- read Middle
- echo -n "Enter your age: "
- read age
- luckyNum=$RANDOM
- user=$USER
- currDate=`date`
- directory=`pwd`
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice
- while [ $choice -ne 6 ]
- do
- case $choice in
- 1)
- echo "Student ID: $IDNum"
- echo "First Name: $First"
- echo "Last Name: $Last"
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice;;
- 2)
- echo "Student ID: $IDNum"
- echo "First Name: $First"
- echo "Middle Initial: $Middle"
- echo "Last Name: $Last"
- echo "Age: $age"
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice;;
- 3)
- echo "You are currently loged in as $user and you current directory is $directory"
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice;;
- 4)
- echo "Your lucky number for today $currDate is $luckyNum"
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice;;
- 5)
- echo -n "Enter ID Number: "
- read IDNum
- echo -n "Enter Last Name: "
- read Last
- echo -n "Enter First Name: "
- read First
- echo -n "Enter Middle Initial: "
- read Middle
- echo -n "Enter your age: "
- read age
- echo "DO YOU WANT TO..."
- echo "1. Display Student ID, First and Last Names only"
- echo "2. Display all captured information"
- echo "3. Display terminal-related information only"
- echo "4. Display lucky number for today"
- echo "5. Enter new set of user information"
- echo "6. Exit"
- echo -n "Please enter the number of your choice: "
- read choice;;
- 6) ;;
- *)
- echo -n "Please enter the number of your choice: "
- read choice;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement