[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: view the exit status from command line



Hi Kamaraju

On Wed, Aug 15, 2007 at 12:51:06AM -0700, Kamaraju Kusumanchi wrote:
> Let's say I run a command in bash which is  run via konsole. How can I view its exit status.
> 
> For example, if I do
> 
> $test -x debian/rules
> 
> I want to know if the command exited with status zero or non-zero. Can this be done in a simple way?

$test -x debian/rules; echo $?

man bash:
	 Special Parameters
	 (...)
	  ?      Expands to the status of the most recently executed foreground
	  pipeline.

> 
> thank for any suggestions
> raju
> 

HTH
-- 
Joachim Fahnenmüller



Reply to: