Linux Commands - printf (print output)
by
Jeremy Canfield |
Updated: January 26 2021
| Linux Commands articles
The printf and echo commands are used to print text. In this example, the printf command is used to print Hello World.
printf "Hello World"
new lines
By default, the printf command will not include a new line at the end of a string, whereas by default, the echo command will include a new line at the end of a string. The \n regular expression can be used to include a new line at the end of a string.
printf "Hello World\n"
Did you find this article helpful?
If so, consider buying me a coffee over at