Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am automating a test using crash package.

is there some thing like $? in bash shell, which can be used to check if previous command is executed success fully or not.

eg : when command

crash> bt -a

is executed, how to know if it was successfull or not.
only solution in my mind is greping through the result
But its not reliable when the enviornmentchanges.

this is what i get when I try echo $?

crash> bt asd
bt: invalid task or pid value: asd
crash> $?
crash: command not found: $?
crash> echo $?
crash> q
share|improve this question
What about echo $? – max Jun 7 '13 at 7:54
it always print 0 even if the command was a failure – limovala Jun 7 '13 at 7:58
Check this link – max Jun 7 '13 at 8:01
@max sorry, I think the question is misleading, I need to check the status inside the crash shell. – limovala Jun 7 '13 at 8:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.