This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
haas:fall2021:unix:projects:mtf0 [2021/10/04 15:04] – [printf] wedge | haas:fall2021:unix:projects:mtf0 [2021/10/04 15:05] (current) – [bc] wedge | ||
---|---|---|---|
Line 115: | Line 115: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46: |
4*5 | 4*5 | ||
20 | 20 | ||
Line 122: | Line 122: | ||
Because it takes input from STDIN, and sends output to STDOUT, it can be especially useful in a command pipeline. | Because it takes input from STDIN, and sends output to STDOUT, it can be especially useful in a command pipeline. | ||
- | By default, it expects input values to be in base 10, and outputs the result in base 10. | + | < |
+ | lab46: | ||
+ | 20 | ||
+ | </ | ||
+ | |||
+ | By default, it expects input values to be in base 10, and outputs the result in base 10. But it possesses the ability to change the base used for output and input transactions. | ||
+ | NOTE: when changing the base, unless you take into account the representation of the base once the input base has been modified, change the output base before changing the input base. | ||
====printf==== | ====printf==== | ||
The **printf** tool is an especially powerful output formatter. | The **printf** tool is an especially powerful output formatter. |