I used alien to convert an RPM to a .deb. I did NOT use alien's script conversion; I'm converting by hand.  Indeed, the script did barf on some non-compatible syntax.  My question is NOT about how to fix this incompatibilty, but rather about how the script continues to execute successfully, despite encountering an error.  Here's the problematic section:if [ `/bin/echo '\c'` ==  ]; then   ECHO_ESC=/bin/echoelse   ECHO_ESC=/bin/echo -efiThis causes the following error:./avsetup_mcc: 11: [: \c: unexpected operatorDespite this, the script continues to execute perfectly.  So, what's happening here?
What is happening when a script encounters an error in one of the commands?
shell script;dash
[ is not a special builtin, and according to POSIX a Utility syntax error (option or operand error) of a non-special builtin Shall not exit a non-interactive shell (script).So much as for why the shell does not exit. The script functions perfectly because ECHO_ESC is set to something sane no matter how the if branches.Unlike the error message suggests, the error does not come from the \c but the == which is invalid to use with [ (string equality is tested with a single =), but shells that support [[ (which supports ==) seem to allow == even for the single bracket notation (e.g. bash, ksh). Note that the above code does not error under bash, so you might want to consider retagging your question.