Don’t understand this SyntaxError: illegal target for annotation
Look at these lines: If, Elif are titled words, when they should be lowercase, so do: Instead.
Look at these lines: If, Elif are titled words, when they should be lowercase, so do: Instead.
No, they are not the same. If the first statement is true, its code will execute. Also, if the second statement is true, its code will execute. The second block will only execute here if the first one did not, and the second check is true. The first statement will execute if it is true, … Read more
you have an else statement after a for loop you probably have to make a Boolean variable to do this one. there are various ways to do it, but here’s one that I would probably use
“too many arguments” means the number of “,” , “(” & “)” is not right. Just double check for each if(a,b,c) and and(a,b,c) to have enough brackets, data/arguments and comma. In your code, there is a total of 73 pieces of “(” and only 71 “)” . Thus, it is clear that some “(” or … Read more
For string equality comparison, use: For string does NOT equal comparison, use: For the a contains b, use: (and make sure to add spaces between the symbols): Bad: Good:
test‘s string equality operator doesn’t do globs.
Your elif is not indented properly…it should be indented the same way if is indented. Seeing the else block, it seems that you have by mistake indented the first if. Remember that elif/else should be preceded by an if always. EDIT: corresponding to the edited question details: Why is the second else there? It isn’t preceded by an if. I feel you need to get your conditions organized properly before … Read more
You can use generator expressions like this:
You would want and instead of &&.
What you have should work, unless ${STATUS} is empty. It would probably be better to do: or It’s hard to say, since you haven’t shown us exactly what is going wrong with your script. Personal opinion: never use [[. It suppresses important error messages and is not portable to different shells.