For some reason calc always becomes interactive (as if I had specified -i, or not specified an expression at all). I have to press CTRL-C multiple times to exit.
~ calc 5+4
9
^C
[Abort level 1]
^C
[Abort level 2]
^C
[Abort level 3]
^C
ABORT
~
It worked fine on my old mac. I installed it using brew (on both machines), and reinstalling calc doesnt help. What could be the reason?
Edit: I've tried starting a clean bash shell, I've checked aliases, and I've tried to use -q -e
to ignore environment and configuration files. None of these things have helped.
~ type -a calc
calc is /usr/local/bin/calc
~ calc -q -e 5+4
does not change the behaviour.
~ env -i bash --noprofile --norc
bash-3.2$ calc 5+4
doesnt help either.
~ ls -l /usr/local/bin/calc
lrwxr-xr-x 1 lafp admin 34 Feb 28 14:43 /usr/local/bin/calc -> ../Cellar/calc/2.12.7.1_1/bin/calc`
I did find something that does help. Switching to a different user! (in this case root).
~ sudo su
root@... calc 5+4
9
root@...
calc is /usr/local/bin/calc
. Did you see anything in the documentation that mentions startup files? I didnt...env -i /usr/local/bin/calc 5+5
), and it gave the same result.env -i bash --noprofile --norc
) doesnt help.