Converting with units
Do you always forget how many drams there are in an ounce? Never fear. The units utility makes converting measurements a snap. See Code Listing 15.4 to learn how to convert with units.
Code Listing 15.4. Use the units utility to find out how to convert from anything to anything else—really!
[jdoe@frazz bin]$ units 1948 units, 71 prefixes, 28 functions You have: inch You want: feet * 0.083333333 / 12 You have: [jdoe@frazz bin]$ |
To Convert with units:
1. | units
At the shell prompt, type units. The Unix system will prompt you with “You have:” as shown in Code Listing 15.4.
|
2. | inch
Enter the units you’re starting with. You’ll then be prompted with “You want:”
|
3. | feet Enter the kind of units you want, and watch with amazement ... |
Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.