Best part of reading this is coming away having learned the existence of units the CLI. How did I spend 20 years on the shell and not have needed or discovered this?
I wonder what people would say for something using an equation of the form y = a x^2 + b x + c to transform something? I can't say that I've heard anyone talk of quadratic transformations. On the other hand, I can't think of ever transforming anything with a quadratic equation, so never had the need t speak of it.
(Also, he called it a linear conversion, not a linear transformation).
It seems that GNU units at some point added support for several non-linear units, which may have prompted them to rethink their syntax.
You have: 10 franc
You want: dollar
conformability error
1.5244902 euro
1 usdollar
You have: 10 franc
You want: euro
* 1.5244902
/ 0.655957 $ units
Currency exchange rates from FloatRates (USD base) on 2019-06-05 $ units
Currency exchange rates from FloatRates (USD base) on 2020-05-12
$ sudo units_cur
$ units
Currency exchange rates from FloatRates (USD base) on 2020-07-09
(GNU units, packed by Debian) # systemctl edit units-currency-update.service
[Unit]
Description=Update units(1) currency rates
[Service]
Type=oneshot
Nice=19
ExecStart=/usr/bin/units_cur
# systemctl edit units-currency-update.timer
[Unit]
Description=Update units(1) currency rates
[Timer]
OnCalendar=daily
AccuracySec=3h
Persistent=true
[Install]
WantedBy=timers.target
# systemctl daemon-reload
# systemctl enable units-currency-update.timer 3 millilightyears / 365 / 86400
Of course, round 365 to whatever average number of days you believe in :-)You have: mph
You want: kph
* 1.609344
/ 0.62137119 alias units='units --verbose
in my shell rc which makes the output much more understandable: You have: mph
You want: kph
mph = 1.609344 kph
mph = (1 / 0.62137119) kph