Let's take them one block at a time. First: (SC1009 and SC1073)
Line 61:
function print_2() {
^-- SC1009 (info): The mentioned syntax error was in this function.
^-- SC1073 (error): Couldn't parse this brace group. Fix to allow more checks.
This relates to the function defined in line 61 print_2
. Here you're missing a closing bracket }
after the function, and before you define the next function.
So I guess it should look like this:
# Define a function to print User management menu
function print_2() {
clear
echo " "
echo "-----User management-----"
echo " "
} # <--- REMEMBER TO ADD THIS
And then: (SC1056 and SC1072)
Line 164:
manage_users;
^-- SC1056 (error): Expected a '}'. If you have one, try a ; or \n in front of it.
^-- SC1072 (error): Missing '}'. Fix any mentioned problems and try again.
I guess these will automatically disappear when you add the aforementioned closing bracket - since the parser is still expecting one.
Also, please be aware that you have the following code at the end of the script:
function print_2() {
true
# other function code goes here
}
This will OVERRIDE any existing print_2
function, so please check if this should be here at all.
Finally, if you're doing nested functions, you should use indentation to show this. I assume the closing bracket should be where I wrote, but only you will know. Indentation will help you manage the different parts in your script, and a general tip would to make indentation consistent for better readability.