Linux elemental cli calculator bc.
Hi: had it not a prompt. I type 'bc', immediately type operands and operators and get the result. No prompt?
|
Funny I never knew that existed. Pretty cool. Weird that it complains if you put in an equals. And you have to use -l if you do anything floating point.
Yeah, a prompt would be nice as well as allowing CTRL-C to just quit it. Looks like they put in a signal handler and they give you a statement. But who wants to "type" quit? Many also might look to type exit because that's what you use on an xterm. |
Not entirely sure what you did, but bc doesn't have a visible prompt:
Code:
$ bc Code:
$ bc |
Took me a bit to locate it; I use google versus go right to GNU, where I eventually find it anyways. bc-1.06.tar.gz Modify the source to have a prompt, maybe make it give actual help versus return zero when you type help, IMHO allow equals, and by default, be able to perform floating point calculations. I'm not going to bother, it's cool but I usually have a desktop up, have plenty of actual calculators around too.
|
@rtmistler: some things can be done by invoking bc with the -l option.
Without -l: Code:
$ bc -q Code:
$ bc -ql Code:
$ cat bcrc |
Thank you guys. Then I was wrong. Yes, the blocking of ^C seems excess of tidiness.
|
Quote:
|
All times are GMT -5. The time now is 02:16 AM. |