Posts Tagged ‘bash’

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"

How to Change User’s Shell Environment in FreeBSD

Wednesday, May 26th, 2010

In FreeBSD, user’s default shell environment is either sh or csh and I have installed Bash in FreeBSD and would like to change user’s shell environment to Bash.

To change user’s shell environment in FreeBSD.


shell> chsh -s /usr/local/bin/bash userid

To change your shell environment in FreeBSD


shell> chsh -s /usr/local/bin/bash