I have a bash script (not mine) that is generating some errors. I'm trying to fix that but there is a section that I do not understand.
Code:
snpsOALib=`OA_MODE=opt $OA_ROOT/bin/oaGetLibPath`
if [ $? != 0 ] || [ ! -d $snpsOALib ]; then
echo "Error: Incomplete installation. OpenAccess is missing or improperly installed."
exit 1
fi
export OA_ROOT
$OA_ROOT is a directory
I don't know what $? is .. I thought it's a variable but that is the only one written in the file(it is not defined before,neither $? nor ?).
now what does this If statement mean ?? can somebody explain ??