Math &Miscellaneous &Software 29 Aug 2006 01:00 pm

Unit Conversion in OS X (or any unix)

I never realized that there was such a handy tool available at the command line before. D’oh. That is great.

FOLLOWUP: It doesn’t do temperatures, only straight multiplicative conversions. Still handy.

UNITS(1)                  BSD General Commands Manual                 UNITS(1)
NAME
     units -- conversion program
SYNOPSIS
     units [-f filename] [-qv] [from-unit to-unit]


[segovia:~] bobevans% units
500 units, 54 prefixes
You have: 2 pints
You want: cups
        * 4
        / 0.25
You have: 2 imperial pints
You want: cups
        * 4.8038
        / 0.20816853
You have: 4 quarts
You want: bushels
        * 0.10742088
        / 9.3091775
You have: .25 acres
You want: feet * feet
        * 10890
        / 9.1827365e-05
You have: 

3 Responses to “Unit Conversion in OS X (or any unix)”

  1. on 29 Aug 2006 at 1:26 pm 1.Kevin said …

    Dude. Google.

    http://www.google.com/search?q=4+imperial+gallons+in+litres

  2. on 29 Aug 2006 at 1:30 pm 2.Kevin said …

    http://www.google.com/search?q=451+fahrenheit++in+celsius

  3. on 29 Aug 2006 at 2:11 pm 3.Bob said …

    Oh yeah, too true. As long as I am online, it is much nicer.