On Wed, Jun 28, 2023 at 04:41:46AM -0500, Dan Jacobson wrote:
> Here we see the "d" items are mixed with the "m" items,
> but the "m" isn't shown:
> set 42.1527288 -87.8284360 42.1817060 -87.8275970
> geod +ellps=GRS80 -I <<EOF
> $@
> EOF
> 1d14'1.178"   -178d45'56.794" 3219.433
> 
> But you are right,
> $ set $(units --terse 1mi)
> $ echo $1
> 1609.344
> Me throwing away $2 without double checking it is really "m" will come
> back to bite me one day.
> 
> Anyway my only goal was to reduce needing a post processing method to edit
> the result. (And thus needing different methods on differing operating
> systems.)

I'm confused about how the existing capability does not fully meet
your needs.  You TELL UNITS what you need and it won't give you any
units on the output.  This avoids the possibility of being bitten by
assumptions later on, and no post processing is required.

> 
> I was just hoping there was a way to say
> units --give-me-just-how-many-meters(feet, etc.)-please

This feature already exists.  It's unit conversion.  You just need to
give the "I want" factor in your invocation, as I have noted in
my earlier messages:

units --terse mile meters

The output is a bare number.  Or, you know

units --terse mile inch

would display a bare number giving the mile in inches.

Reply via email to