oMish 1189581899 learn $? is exit status of previous command. Value 0 means success, non-zero value means some kind of error. oMish 1194627737 forget oMish 1194627817 learn $? is "exit status" of previous command, also known as "return status". It is integer number between 0 and 127 if command did not terminate by signal, and larger than that if terminated by signal. Value 0 means success, non-zero value means some kind of error. greycat 1235401203 forget greycat 1235401264 learn The special parameter ? (you use $? to expand it) contains the exit status of the previous command, an integer from 0 to 255 inclusive. In general, an exit status of 0 implies success (or "true") and non-zero implies failure ("false"). ormaaj 1363770530 forget ormaaj 1363770563 learn learn The special parameter ? (you use $? to expand it) contains the exit status of the previous command, an integer from 0 to 255 inclusive. In general, an exit status of 0 implies success (or "true") and non-zero implies failure ("false"). http://wiki.bash-hackers.org/dict/terms/exit_status lhunath 1374936400 forget lhunath 1374936769 learn The special parameter ? (expanded by $?) holds the exit status of the last synchronous command. It is an 8-bit integer (0-255) where 0 indicates success and non-0 a command-specific failure. A kill'ed command exits with 128+the signal that killed it. Avoid thinking about exit codes as true or false. lhunath 1374936785 forget lhunath 1374936840 learn The special parameter ? (expanded by $?) holds the exit status of the last synchronous command. It is an 8-bit integer (0-255) where 0 indicates success and non-0 a command-specific failure. A kill'ed command exits with 128+the signal that killed it. Avoid thinking about exit codes as true or false. http://wiki.bash-hackers.org/dict/terms/exit_status kurahaupo 1382514724 forget kurahaupo 1382514738 learn You will often see code like « somecmd ; if [[ $? = 0 ]] ; then ... ». Such code should be rewritten as « if somecmd ; then ... ». Likewise « somecmd ; if [[ $? != 0 ]] ; then ... » should be rewritten as « if ! somecmd ; then ... » (The special parameter ? (expanded by $?) holds the exit status of the last synchronous command, or (sometimes) 0 after an asynchronous command is started. It is an 8-bit integer (0-255) where 0 indicates lhunath 1390142730 forget lhunath 1390142801 learn The special parameter ? (expanded by $?) holds the exit status of the last synchronous command.