Posts Tagged ‘unix’
Interesting bash prompts
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]\\$ “
Amazing One Line Script
leave a comment »
I was stumbling around on the internet this morning and I found this awesome site… (http://www.centerkey.com/tree/)
This guy posted an amazing one line script that will graphically show your directory tree with a simple one line command:
and that’s all!!! It works great!
Written by ejes
March 17, 2010 at 11:42 am
Posted in Commentary, Neat Stuff/Good Ideas, Scripts
Tagged with bash, ksh, one line, script, sh, tree, unix