I have the following problem that I have not resolved for a long time now. We have a Linux (x86_64 GNU/Linux) server and a Solaris (SunOS 5.10 i86pc Solaris) server where I work. On the linux server, the command bc -l gives me a calculator where I can easily work with the numerals and commands, along with using the left and right arrows to navigate. Using the up/down arrows gives me the history of my commands. It's another story on Solaris though. The arrow keys do not work at all. I cannot edit the line, nor can I get the history. Can someone here please help me set up the proper configuration of bc on the Solaris OS?
1 Answer
The bc that comes with Solaris is quite historic.
To get the same bc feeling as on Linux just install the gbc OpenCSW package.
-
OP doesn't have root access. Can this package be installed by a user locally?muru– muru2014-10-07 20:08:44 +00:00Commented Oct 7, 2014 at 20:08
-
I am sorry for tiresomeness but I am not so good in all these packages. When I click there I finally get the same bc source I already tried to compile.Alexander Vigodner– Alexander Vigodner2014-10-07 20:18:06 +00:00Commented Oct 7, 2014 at 20:18
-
@muru, short answer: nomaxschlepzig– maxschlepzig2014-10-07 20:30:03 +00:00Commented Oct 7, 2014 at 20:30
-
It's probably not historic, but Unix.Martin Schröder– Martin Schröder2014-10-07 21:14:39 +00:00Commented Oct 7, 2014 at 21:14
bccompiled withreadlinesupport: gnu.org/software/bc/manual/html_chapter/bc_7.html Solaris may have GNU bc available (I haven't used it for a long time, so I don't remember).--with-editline, without aw, I think (and that needs a BSD library, unlikely to be present. Do you have any GNU utility installed on your system? If not, try compiling GNU readline as well.