Hi,
In linux we have exit status variable ($?) and status which tells whether last command was successfull or not. Can someone please tell me what is difference between both. Both tells whether command was successful or not, Any particular difference between them?
Thanks in Advance.
Thanks
Sarbjit
The only one I know of is that not all shells support both of them:
$ uname -sr
SunOS 5.8
$ ksh -c 'print $status'
$ csh -c 'echo $?'
Variable syntax
$? is from sh/ksh/bash
$status is from csh family
both means the exit status of the last command
Just to add that the recent versions of the (t)csh family (and zsh) support both.