When getting user input via the read command and storing in a variable. For example:
get_username() {
  read -p "Enter your username: " username
}
another_function() {
  echo $username
}
get_username; another_function;
The $username variable is now available globally within the entire script. Is there a way to restrict the scope of the variable stored from the user input or delete it after it is no longer needed?
