-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC1089
Vidar Holen edited this page Oct 4, 2015
·
2 revisions
if true
then
echo hello
fi
fi
if true
then
echo hello
fi
This error is typically seen when there are too many fi
, done
or esac
s, 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="foo
if [[ $var = "bar ]
then
echo true
fi
In this case, the if
ends up inside the double quotes, leaving the then
dangling.
None.