From e10f8dafc9e79e88156bf96c6e92620d2ed2fff9 Mon Sep 17 00:00:00 2001
From: Brandon Rodriguez <brodriguez8774@gmail.com>
Date: Sat, 10 Oct 2020 09:13:44 -0400
Subject: [PATCH] Correct some syntax and comments

---
 utils.sh | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/utils.sh b/utils.sh
index 4bf49ed..0e13cc5 100755
--- a/utils.sh
+++ b/utils.sh
@@ -30,13 +30,13 @@ return_value=""
 #region User Check Functions
 
 ###
- # Function to check if current username matches passed value.
+ # Checks if current username matches passed value.
  # In particular, is used to check if user is sudo/root user.
  ##
 function check_is_user () {
 
     # Check number of passed function args.
-    if [[ $# == 1 ]]
+    if [[ ${#} == 1 ]]
     then
         # Expected number of args passed. Continue.
         local username=$USER
@@ -62,7 +62,7 @@ function check_is_user () {
         fi
 
     # Handle for too many args.
-    elif [[ $# > 1 ]]
+    elif [[ ${#} > 1 ]]
     then
         echo -e "${text_red}Too many args passed. Expected one arg, received ${#}.${text_reset}"
         exit 1
@@ -76,13 +76,13 @@ function check_is_user () {
 
 
 ###
- # Function to check if current username does not match passed value.
- # In particular, is used to check if user is sudo/root user.
+ # Checks if current username does not match passed value.
+ # In particular, is used to check if user is not sudo/root user.
  ##
 function check_is_not_user () {
 
     # Check number of passed function args.
-    if [[ $# == 1 ]]
+    if [[ ${#} == 1 ]]
     then
         # Expected number of args passed. Continue.
         local username=$USER
@@ -108,7 +108,7 @@ function check_is_not_user () {
         fi
 
     # Handle for too many args.
-    elif [[ $# > 1 ]]
+    elif [[ ${#} > 1 ]]
     then
         echo -e "${text_red}Too many args passed. Expected one arg, received ${#}.${text_reset}"
         exit 1
@@ -131,7 +131,7 @@ function check_is_not_user () {
 function to_upper () {
 
     # Check number of passed function args.
-    if [[ $# > 0 ]]
+    if [[ ${#} > 0 ]]
     then
         # At least one arg passed. Loop through each one.
         return_value=()
@@ -154,7 +154,7 @@ function to_upper () {
 function to_lower () {
 
     # Check number of passed function args.
-    if [[ $# > 0 ]]
+    if [[ ${#} > 0 ]]
     then
         # At least one arg passed. Loop through each one.
         return_value=()
@@ -163,7 +163,6 @@ function to_lower () {
             return_value+=( $(echo "${arg}" | tr '[:upper:]' '[:lower:]') )
         done
 
-
     # No args passed.
     else
         echo -e "${text_red}Too few args passed. Expected one arg, received 0.${text_reset}"
@@ -175,7 +174,7 @@ function to_lower () {
 
 
 ###
- # Function to print out all available text colors provided by this script.
+ # Prints out all available text colors provided by this script.
  ##
 function display_text_colors () {
     echo ""
-- 
GitLab