You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vidar Holen edited this page Oct 4, 2015
·
2 revisions
Parsing stopped here. Is this keyword correctly matched up?
Problematic code:
iftruethenecho hello
fifi
Correct code:
iftruethenecho hello
fi
Rationale:
This error is typically seen when there are too many fi, done or esacs, or when there's a do or then without a corresponding while, for or if. This is often due to deleting a loop or conditional statement but not its terminator.
In some cases, it can even be caused by bad quoting:
var="fooif [[ $var = "bar ]
thenechotruefi
In this case, the if ends up inside the double quotes, leaving the then dangling.