Bug#1039533: Offer a way to just print the numbers, not also the units

2023-11-19 Thread Adrian Mariano
I added an example to the --terse entry in the manual. Debian should close this bug. On Thu, Jun 29, 2023 at 07:55:59AM -0500, Dan Jacobson wrote: > Ah ha! > You see the batch job user scours the man page, and only finds: > > >-1, --one-line > Give only one line of

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-29 Thread Adrian Mariano
> But in fact, --terse should say: > >-t, --terse > Print only a single conversion factor. This option can be used > when calling units from another program so that the output is > easy to parse. This option has the combined effect of these

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-29 Thread Dan Jacobson
Ah ha! You see the batch job user scours the man page, and only finds: -1, --one-line Give only one line of output (the forward conversion); do not print the reverse conversion. If a reciprocal conversion is performed, then units will

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-28 Thread Adrian Mariano
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 > 1d14'1.178" -178d45'56.794" 3219.433 > > But you are right,

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-28 Thread Dan Jacobson
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 <

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-27 Thread Adrian Mariano
On Tue, Jun 27, 2023 at 04:24:08AM -0500, Dan Jacobson wrote: > I am just saying that some commands, > like > > set 42.1527288 -87.8284360 42.1817060 -87.8275970 > geod +ellps=GRS80 -a -p -f %.6f -F %.4f -I +units=us-ft < $@ > EOF > 42.152729 -87.828436 42.181706 -87.827597 1.233661 181.234224

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-27 Thread Dan Jacobson
I am just saying that some commands, like set 42.1527288 -87.8284360 42.1817060 -87.8275970 geod +ellps=GRS80 -a -p -f %.6f -F %.4f -I +units=us-ft <

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-26 Thread Adrian Mariano
The proposed option gives invalid/incorrect results. The value of 1 mile is not in fact 1609.334---the "m" is an essential part of the result. If you want the bare number you can do factor=$(units --terse 1mi m) If you don't know what the unit to convert to is---"m" in this case---then you

Bug#1039533: Offer a way to just print the numbers, not also the units

2023-06-26 Thread Dan Jacobson
Package: units Version: 2.22-2 Severity: wishlist X-Debbugs-CC: adri...@gnu.org Offer a way to just print the numbers, not also the units. Currently one must do: set $(units --terse 1mi) echo $1 1609.344 So maybe have a units --just-the-numbers, when combined with --terse, would print just the