Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Oct 232010

How to echo a tab in bash?


In Bash script, if you want to print out unprintable characters such as tab, you need to use -e flag together with the echo command.


echo -e "\tfoo\tbar"

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>