I have a strange behaviour I don't seem to understand.
Bash version is:
$ bash --version
GNU bash, version 3.00.15(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
In my prompt i do the following:
]$ echo $?
$ if [ $? -eq 1 ] ; then
> echo good
> echo bummer
So far so good. Logic seem right, BUT in my script whre I have exactly the same code:
if [ $? -eq 1 ] ; then
If I change the logic in my script (Completely the opposite):
if [ $? -ne 1 ] ; then
Now, for me this is very odd. Am I missing something?