Long story short, is it possible to make bc evaluate the following expression?
echo "!(2.2 >= 0) && !(2.2 < 10)" | bc
bash: !: event not found
I know this works:
echo "(2.2 >= 0) && (2.2 < 10)" | bc
1
So what am I doing wrong? The bc man page said that it has support for !expr, but I cannot seem to invoke it. I know it's possible to work around the issue by negating the comparison signs, but I'd like to know how should the !expr be invoked in this case.
Much appreciated.