4 ms·
TIL: units is a really useful utility command that I had forgotten even existed.
by stevefeinstein 9y ago
TIL: units is a really useful utility command that I had forgotten even existed.
- late2part 9y agoYou have: 100 millilightseconds unknown unit 'millilightseconds' You have: ^D Apparently I need to add more units to achieve this level of usefulness.
- parraccourci 9y agotry "3 ms"
- dmacedo 9y agoSomething tells me you're on OS X, and like myself, you'll find you mostly want everything replaced with GNU binaries: $ brew install gnu-units $ gunits Also see: https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities https://apple.stackexchange.com/questions/69223/how-to-repla...
- emilfihlman 9y agoWell user@server:~$ units -V GNU Units version 2.11 with readline, with utf8, locale en_US Units data file is '/usr/share/units/definitions.units' Personal units data file is '/home/user/.units' (file does not exist) Copyright (C) 2014 Free Software Foundation, Inc. GNU Units comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Units under the terms of the GNU General Public License. user@server:~$ units Currency exchange rates from www.timegenie.com on 2014-04-02 2866 units, 109 prefixes, 79 nonlinear units You have: 3millilightseconds You want: miles * 558.84719 / 0.0017893979 You have: user@server:~$ Works for me.
- shubhamjain 9y agoIt does induce a geeky joy but it's ephemeral for the most part as Google is vastly superior in usefulness. I learned about units few years back, used it for a while, and I can't even remember when but I just started Googling the conversions instead of switching to the terminal window.
- kalleboo 9y agoI mostly use Spotlight (on OS X) to do conversions since it saves me switching to the browser or terminal. It doesn't handle as advanced conversions as Google does but it handles 90% of my common cases (including currencies)
- c06n 9y agoDamn, I didn't know Spotlight could do this. Thanks!
- BenjiWiebe 9y agoI don't think Google can convert millilightseconds to miles at one go. The units program has support for much more esoteric units than Google does.
- sp332 9y agoIt doesn't understand millilightseconds, so you need https://encrypted.google.com/search?q=%283+milliseconds+*+speed+of+light%29+in+miles https://encrypted.google.com/search?q=%283+milliseconds+*+sp... or https://encrypted.google.com/search?q=3+light+seconds+%2F+1000+in+miles https://encrypted.google.com/search?q=3+light+seconds+%2F+10...