In Unix, if we do echo $?, it shows the status of the last command executed.
Where $? holds the value 0 or 1:
- 0 implies success
- 1 implies failure
But how can we know the status of a command executed in a Cisco switch?
In Cisco device, if it provides no output error, it was successful. If any error occurs, It will show the details of where is your mistake in the command, mark by the caret symbol - "^" - under the character you were wrong.
Another note, in Unix, any return code that not equal zero means that the command failed.
$?can hold other values too, all non-zero values indicate a failure. – Dennis Kaarsemaker May 06 '13 at 12:37