Added a function to remove unnecessary repetition

A flexible function has been added which should take care of repetitive
work regarding user input.
Added a string specific function

A version of the user_input function for strings only has been created.
This should solve errors resulting from using integer comparators on
strings.
Changed variable arguments to strings

Explicitly quoting strings should reduce errors in parsing.
Refactored user input function to make use of case

statements more extensively.
Fixed a bug where wrong function name was referred

to. Functions now use correct names.
Added validation for the ip and environment type

Value validation now occurs for ip address input and environment type
validation. IP address validation occurs through the use of a new
function validate_ip_addr while environment has validation in place
using comparators.
Fixed issue with incorrect variable assignment

Variable assignment should now be properly performed.
Changed from numerical values to true/false

Usage of keywords cuts down on ambiguity regarding exit codes.
Reverted to numerical values due to issues

Due to issues with non numerical values and return values, numerical
values and echo statements are now being used to resolve this issue.
Added missing return statement

Fixed an issue where a function was not exiting when it should.
Modified if statement to use double brackets

Single brackets were causing problems so bash extended conditional
expression is used instead.
Changed comments to accurately reflect function

behaviour. This should minimize confusion.
Removed commented out code

Commented out code is messy and unnecessary and has now been removed.
Fixed comments for user_input

Outdated comments updated to reflect current functionality.
Changed continue statements to exit

Exiting from the script now the default action on a failure.
Added review options at end of script

Added functionality allowing the user to review the options chosen
before committing to them.
Fixed formatting issues

Formatting issues have been resolved by adding newlines.
Fixed issue with incorrect referencing of variable

Variable prompt is now properly referenced in the code.
Modified permissions to give execute rights for

owner of file. In this case, the owner of the file is expected to be
root. Allowing root execute privileges allows certain functions to work
properly.
Removed unnecessary break statements

Break statements were left over from previous work and is no longer
needed. These can be safely removed.