Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 $?
0
crash>
crash> q
root@at0012-ubuntu:~/crashKernel# 
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
1  
@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

 
discard

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

Browse other questions tagged or ask your own question.