Ir al contenido principal

Using the calculator in the terminal

Hi to all, this is a small issue I had the last days. Use a calculator in the terminal. I have been working and sometimes need to do an arithmetic operation so I decided to open  calc (Ubuntu Calculator Default). But I was wondering, there has to be a way to use a calculator in the CLI. So after some search in the engine I found this question in Ask Ubuntu and tried several options.

I will only write about the  best solution I found for my needs. In the question, you can find several solutions and probably you will find a different solution that will be best for you.

CALC (Arbitrary precision calculator)

Calc is an arbitrary precision arithmetic system that uses a C-like language. Calc is useful as a calculator, an algorithm prototyper and as a mathematical research tool. More importantly, calc provides one with a machine independent means of computation. Calc comes with a rich set of builtin mathematical and programmatic functions.

If you want to install calc you can use the following command:

sudo apt-get install apcalc

Comentarios

  1. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  2. Yes, I saw it as an option, but using echo and then pipe, didn't like it to much.

    ResponderEliminar

Publicar un comentario

Entradas populares de este blog

Que buscaron los hondureños en Google en el 2017

Se han preguntando que buscan los catrachos en Internet? Les traemos un resumen de las busquedas de este 2017 en Honduras.

Pre order your Super Smash Bros. Ultimate for Nintendo Switch

Are you fan of Super Smash Bros! Don't wait until the last minute, you can pre order you Super Smash Bros Ultimate here This new game has stages and fighters are joined by the combined rosters of every past Super Smash Bros game. If you buy it, you will be enjoying this Limited Time Offer: Piranha Plant Playable Fighter. Buy Super Smash Bros. Ultimate and register your game with My Nintendo by 11:59 PM on Jan. 31, 2019 and get Piranha Plant in your game for free.

Actualizar de Ubuntu 14.04 a 16.04

Ya ha pasado vario tiempo, desde que estoy trabajando con la versión LTS Ubuntu 14.04, pero creo que ha llegado el tiempo de actualizar a la nueva versión LTS 16.04. Las principales razones, son que necesito trabajar con el nuevo kit de desarrollo de java 1.8 y no hay soporte oficial para la versión open source en 14.04. Aparte que nunca me sentí muy conforme con dicha versión, considero que hubieron anteriores mejores. Esta es una guía, que les permitirá migrar de Ubuntu 14.04 a 16.04. Paso 1: Aseguremos que estemos con las ultimas actualizaciones instaladas. Si tenemos una versión en español, saldría algo parecido a la imagen siguiente. Paso 2:  Abrimos la terminal, e insertamos el siguiente comando: sudo update-manager -d Saldra algo parecido a esta imagen. Le damos click al botón de actualizar. Nos aparecerá una ventana titulada "Notas de la versión" Despues de eso le damos click en actualizar. Después del botón de actualizar, nos aparecerá u