So basically you're asking for a command line equivalent to the '?'
interactive command?

You have: FORCE
You want: ?
FORCE    newton
Mag      Maz gravity
N        newton
dyn      dyne
dyne     cm gram / s^2
funal    sthene
kgf      kg force
kip      1000 lbf
kp       kilopond
lbf      lb force
newton   kg m / s^2
nt       N
ouncedal oz ft / s^2
pdl      poundal
pond     gram force
poundal  lb ft / s^2
slinchf  slinch force
slugf    slug force
sthene   tonne m / s^2
tondal   longton ft / s^2
tonf     ton force

On Wed, Dec 11, 2019 at 12:45 AM 積丹尼 Dan Jacobson <jida...@jidanni.org>
wrote:

> X-debbugs-Cc: adri...@gnu.org
> Package: units
> Version: 2.19-1
> Severity: wishlist
>
> Idea:
> Let's say we found some mysterious scale, but cannot figure out what
> units it is reporting in.
>
> We reach into our pocket and place an e.g., 3.75 gram coin upon it...
> Let's say we observe the scale says "0.120". Well running
>
> $ for i in pound dram carat grain oz tailiang kin liang troypound \
>  troyounce pennyweight jewelerspoint momme g apscruple;\
>  do units --one-line --verbose 3.75g $i; done | sort -k 3n | column -t
> 3.75g  =  0.00625       kin
> 3.75g  =  0.0082673348  pound
> 3.75g  =  0.010047108   troypound
> 3.75g  =  0.036075643   liang
> 3.75g  =  0.1           tailiang
> 3.75g  =  0.1205653     troyounce
> 3.75g  =  0.13227736    oz
> 3.75g  =  1             momme
> 3.75g  =  2.1164377     dram
> 3.75g  =  2.411306      pennyweight
> 3.75g  =  2.8935672     apscruple
> 3.75g  =  3.75          g
> 3.75g  =  18.75         carat
> 3.75g  =  57.871344     grain
> 3.75g  =  1875          jewelerspoint
>
> tells us the scale is probably talking in troyounces!
>
> Problem is: all weight related units are hopelessly scattered around the
> units file. We need to find each one by hand.
>
> Well with a new --conformable flag, we could instead do
> $ for i in $(units --conformable g); do ...
> for the same effect.
>
> $ units --conformable feet
> yard km ft m mile ....
>
> $ units --conformable gallon
> liter pint gallon ...
>

Reply via email to