printf - format and print data
printf FORMAT [ARGUMENT]...
Options you will use
%s %d %f %x- String, integer, float, hex.
%-10s %5.2f- Left-justify in 10 columns; 5 wide, 2 decimals.
Gotchas
- printf is portable and predictable where echo is not (echo -e differs between shells). It reuses the format until the arguments run out.
Taught in
Try printf in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.