DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Alias: convert units (with Units)  (Read 8,273 times)

Jabberwock

  • Participant
  • Joined in 2006
  • *
  • Posts: 76
Alias: convert units (with Units)
« on: July 15, 2010, 08:14 PM »
Someone asked for this so nicely:  :P

http://www.donationcoder.com/forum/index.php?topic=8071.msg212665#msg212665

that I have patched up a simple unit converter alias with the use of GNU units program

http://en.wikipedia.org/wiki/Units_%28software%29

(wiki lists the windows binary link - you need to install it and/or GNU-WIN).

Here it is:

Code
1000>>>units>->showmemo Result:;;;appcapappendmemo C:\Program Files\Editing\GnuWin32\bin\units.exe "$$1" "$$2">+>units (.*) to (.*)

Naturally, you may need/want to modify the path and the expression.

Usage:

units 100 miles/hour to km/hour

Result:
* 160.9344
/ 0.0062137119
« Last Edit: July 15, 2010, 08:19 PM by Jabberwock »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: Alias: convert units (with Units)
« Reply #1 on: July 15, 2010, 08:23 PM »

:Thmbsup: this sounds very nice :D
Tom

Original address: https://www.donationcoder.com/forum/index.php?topic=23433.0