How does nested if/then/elseif work in bash? [closed]
I guess your question is about the dangling else ambiguity contained in many grammars; in bash there isn’t such a thing. Every if has to be delimited by a companion fi marking the end of the if block. Given this fact (besides other syntactic errors) you’ll notice your example isn’t a valid bash script. Trying … Read more