ejes consulting

Techincal Consulting Design and Automation

Interesting bash prompts

leave a comment »

Sorry I haven’t posted in a while, been busy working on many MANY things.  However, I did find this which I find quite intersting

There’s some really cool bash prompts at this site:

http://maketecheasier.com/8-useful-and-interesting-bash-prompts/2009/09/04

In my opinion bash is getting quite large and a bit of a resource hog, for a shell that is; but with all it’s bloat comes some VERY decent features, including the ability to modify your prompt to run small shell scripts and display the output. 

The site shows 8 simple examples; but my favorite one displays a happy “^_^” emoticon or a “O_O” emoticon if the last command succeeded or failed:

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

 
Advertisements

Written by ejes

September 8, 2009 at 10:11 am

Posted in Neat Stuff/Good Ideas

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: