BlogBlog ÜbersichtjailscriptportsoptFreeBSDLinksThermoskanneKontakt

Einheiten auf der Kommandozeile umrechnen

Mit Hilfe von units lassen sich Einheiten auf der Kommandozeile umrechnen. Im folgenden Beispiel wird ausgerechnet wieviele Fuss einen Meter sind (3.28 Fuss) und wieviele Pfund ein Kilo sind (2.2 Pfund):

# units
586 units, 56 prefixes
You have: 1 m
You want: ft
        * 3.2808399
        / 0.3048
You have: 1 kg
You want: lb
        * 2.2046226
        / 0.45359237

Alle verfügbaren Einheiten findet man in der Datei /usr/share/misc/units.lib. Auf FreeBSD ist units standardmässig im Basissystem vorhanden. Mehr Informationen und alle Optionen von units findet man in der Manpage units(1).

Comments (0)  Permalink

Comments

add a comment

The Trackback URL to this post is:
http://www.chruetertee.ch/blog/plugin=trackback(1695).xml
Trackbacks are moderated.

This blog is gravatar enabled.
Your email adress will never be published.
Comment spam will be deleted!

Name*
E-Mail
For Spammers Only
URL
Comment*
Notify me via E-Mail when new comments are made to this entry
Remember me (needs cookies)