How to format string using bash printf command with examples?

printf command is used to print a formatted string in the standard output while interpreting ‘%’ directives and ‘\’ escapes to format numeric and string arguments in a way that is most similar to the C ‘printf’ function.

Leave a Reply