My environment was: Mac OS, AWS EC2 Linux Server
Requirements: Linux, .sh file
How to run the program: Download the .sh file or clone the repository, and run it in the Linux
- (You may need to change the file's permission to be executable using
chmod
command - i.e.chmod 744 PasswordValidation.sh
) - $./File Name i.e. PasswordValidation.sh
Source Code
- Basic Calculations
- Password Validation
- Reverse Sorting
- number.txt
Sample Output
A script that do basic caculations with 5 to 10 integers that an user entered
-
It prompts the user for a series of 5-10 integers
- The user must be prompted for a minimum of 5 numbers
- After the user has entered 5 numbers, the program allow the user to stop entry or enter another number -
When the user chooses to stop or after 10 numbers have been entered,
the program stops prompting for values and performs the following calculations:- the product of the integers
- the average of the integers
- the sum of the integers
- the min of the integers
- the max of the integers
-
After performing the calculations, the program display the following to the user:
- the values the user entered
- each of the calculations, using a phrase that identifies the value © mThree
A script to validate how secure someone's password is
- Length should be 8 or more characters
- The password should contain numbers and letters
- There should be both uppercase and lowercase letters © mThree
A script that uses this file to perform the following tasks:
- Read in the file (number.txt)
- Sort the numbers into reverse order and output them to the screen
- Each number should output exactly once. Duplicate numbers should not appear in the output © mThree