The syntax of printf command is: Printf can have escape sequences, format specifiers, arguments, or ordinary characters. For example:

Bash Printf Command Examples

Printf Escape Characters

Some of the common escape characters for Printf are:

\n – Displays a new line. \r – Displays a carriage return. \v – Displays a vertical tab. \ – Displays a backslash character. \b – Displays a backspace character. \t – Displays a horizontal tab.

Conclusion

In this tutorial, you have learned the Linux printf command with examples.