GNU units

GNU units converte tra oltre 3000 unità di misura e ci fa i calcoli: lunghezze, velocità, energia, cucina, temperature, valute, elementi chimici. Scrivi units '5 mph' 'km/hr', oppure units per il prompt interattivo.

versione 2.24.0.1 · Licenza: GPL-3.0-or-later · Sito del progetto

GNU units

A cosa serve

Converte tra oltre 3000 unità di misura e ci fa i calcoli: lunghezze, pesi, velocità, energia, pressione, misure di cucina, temperature, valute, elementi chimici, costanti fisiche. Capisce espressioni intere, per esempio 230 V * 10 A in kW.

Come si usa

Comando Cosa fa
units '5 mph' 'km/hr' converte (mostra il fattore e quello inverso)
units -t '3 cups' ml solo il risultato (-t, comodo negli script)
units -t 'tempF(100)' tempC temperature: tempC, tempF, tempK con le parentesi
units -t '230 V * 10 A' kW calcola con le unità
units -t '2 hours + 30 min' s somma grandezze dello stesso tipo
units -t '100 euro' 'US$' valute
units -t oxygen 'g/mol' massa degli elementi
units prompt interattivo: scrivi l'unità di partenza, Invio, poi quella di arrivo

Da sapere

Limiti

I tassi di cambio sono quelli inclusi nella versione 2.24 (novembre 2024) e non si aggiornano da soli: per tassi recenti metti un tuo currency.units nella cartella units della home. Il comando help interno non è disponibile (richiede un visualizzatore esterno).

Nel Terminale

GNU units

GNU units converts between more than 3000 units of measure and computes with them: lengths, speeds, energy, cooking, temperatures, currencies, chemical elements. Type units '5 mph' 'km/hr', or units for the interactive prompt.

version 2.24.0.1 · License: GPL-3.0-or-later · Project site

GNU units

What it is for

It converts between more than 3000 units of measure and computes with them: lengths, weights, speeds, energy, pressure, cooking measures, temperatures, currencies, chemical elements, physical constants. It understands whole expressions, such as 230 V * 10 A in kW.

How to use it

Command What it does
units '5 mph' 'km/hr' converts (shows the factor and its inverse)
units -t '3 cups' ml the result only (-t, handy in scripts)
units -t 'tempF(100)' tempC temperatures: tempC, tempF, tempK with brackets
units -t '230 V * 10 A' kW computes with units
units -t '2 hours + 30 min' s adds quantities of the same kind
units -t '100 euro' 'US$' currencies
units -t oxygen 'g/mol' element masses
units interactive prompt: type the unit you have, Enter, then the one you want

Good to know

Limits

Exchange rates are the ones shipped with version 2.24 (November 2024) and don't update by themselves: for current rates put your own currency.units in the units folder of the home. The built-in help command is not available (it needs an external viewer).

In the Terminal