Bash printf syntax basics - LinuxConfig.org

When writing a bash scripts most of us by default use echo command as means to print to standard output stream. echo is easy to use and mostly it fits our needs without any problem. However, with simplicity very often comes limitation. This is also the case with echo command. Formatting an echo command output can be a nightmare and very often impossible task to do.
This is a companion discussion topic for the original entry at https://linuxconfig.org/bash-printf-syntax-basics-with-examples

Christopher Hott

FORMAT_STRING=ā€™%b%30s%b%30s\nā€™
need ROB, YOB, REV, UND, all to end on 30 and default code to end on 60 any ideas?