Posts Tagged ‘bash programming’

Bash: How to Echo Tab and Newline

Monday, January 24th, 2011

While printing out result in bash, sometime we need to echo tab or newline for nice, gorgeous, maning looking format. The code below will NOT print tab space and newline


echo "username\t password\n"

In order to print tab and newline, invoke -e in the echo command


ehco -e "username\t\t password\n"