Even if you're already familiar with the printf command, if you got your information via "man printf" you may be missing a couple of useful features that are provided by bash's built-in version of the ...
Hosted on MSN
Why printf is superior to echo in Linux scripts
One of the first commands new Linux users learn is echo. Need to print some text or debug a script? Add an echo statement. However, from my usage, I've found printf to be far more powerful. Once you ...
When you have a width specification of 1 (like you do in the second line) the output will be H or T. If you have anything else, the output will be HEADS or TAILS. But first, we need to add the %H ...
You may or may not know, but printf is a Turing-complete language, once you exploit all the strange and wonderful format characters in it (especially %n). But who has time to write code as printf ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results