PDA

View Full Version : [SOLVED] Probably easy..



MikeVaughanG
March 4th, 2010, 09:00 PM
I found a 'command' online that, when you type a bad command it gives you a smiley face, and when you type a good command it gives you a sad face.



PS1="\`if [ \$? = 0 ]; then echo \[\e[33m\]^_^\[\e[0m\]; else echo \[\e[31m\]O_O\[\e[0m\]; fi\`[\u@\h:\w]\\$ "


My question is..
Is there a way to get terminal to open up with code already done?
So when I opened terminal it already gve me the :( or :)?

Thanks for any help. You guys are always helpful..

Bachstelze
March 4th, 2010, 09:19 PM
Just put the code in your .bashrc. ;)

MikeVaughanG
March 4th, 2010, 09:33 PM
That worked flawlessly. Thank You :)

wmcbrine
March 4th, 2010, 09:38 PM
I found a 'command' online that, when you type a bad command it gives you a smiley face, and when you type a good command it gives you a sad face.That sounds backwards... and indeed it is. What that code does is give you a smiley face on a return code of 0, which is the code for successful completion.

MikeVaughanG
August 25th, 2010, 04:23 PM
It is backwards. Lol
Good eye.