I am creating a Unix .bash_profile script, and I have run into a small problem. Here is a snippet of my code:
echo -n "Welcome "
whoami
echo -n "!"
I would like the output to give something like this:
Welcome jsmith!
... instead, I am getting something like this:
Welcome jsmith
!
How can I get all of this onto one line? Any help is greatly appreciated. If this helps, I am using the Bash Shell, on Ubuntu Server 10.04 LTS.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…