colors in bash scripts

2012-04-30 3 min read bash Fedora Learning
Colours (Photo credit: CherrySoda!) I have been trying to understand the color codes for bash for a pretty long time, but somehow never got time to understand this clearly. So this time around when I was writing a script to analyze some logs. I thought I will give it a go and finally understood some part of this. So, first we will start with this script. This is taken from here. Continue reading

bash prompts — some good links

2012-03-08 1 min read bash
Here are some pretty good links on the subject. Since there are already so many blog posts, does not make sense to add one more 🙂 http://tldp.org/HOWTO/Bash-Prompt-HOWTO/c816.html http://www.gilesorr.com/bashprompt/prompts/ https://bbs.archlinux.org/viewtopic.php?id=84386 Bash themes – http://onlamp.com/onlamp/2006/02/02/bash_themes.html Related articles set prompts for bash Osx? (stackoverflow.com) Difference between Bash shell and Bash terminal? (stackoverflow.com) The Hollywood Reporter Rounds Up Jessica Chastian and Owen Wilson For a Pre-Oscars Bash (popsugar.com)

15 Linux Bash History Expansion Examples You Should Know

2012-03-02 1 min read bash
Image via Wikipedia Here is a nice link on BASH History Expansion. There are lot of examples in this page and some of them might be quite useful. But here are my list of favourites: !! This is probably the most used one by me. This will repeat the last command. And this works even in conjunction with other commands like sudo !! And the second most used one is : Continue reading

some interesting alias

2011-09-27 1 min read Linux
For this time, I will just give you a link to to bashrc file. http://hayne.net/MacDev/Bash/aliases.bash Head over there and see some very interesting aliase’s. Related articles Bryan Quigley: Windows Cant Handle the Hardware (bryanquigley.com) semantic grep (github.com) Aliases and shortcuts (macstarter.com)

better bash debugging

2011-09-16 1 min read bash Linux
I was trying to debug some bash scripts yesterday and learnt something new 😉 There are lot of things in bash that you can use to debug and to start with you can enable xtrace mode as follows: set -x With this set you will see that all the commands are printed along with all other information as they are executed. This you can do for any line or for the function or for the whole script. Continue reading

bash completion

2011-08-09 2 min read bash Fedora Linux
I was working on some functions in bash to make my life easier and realized that if I added custom completion to my functions, it will be really good. So I headed over to google and searched for what I wanted. I did get a lot of information on bash completion but not a single concrete example that could help me do what I wanted. So, with the help of man pages and some results from the Google pages, I was finally able to accomplish what I wanted. Continue reading

Installing Full Blin g theme on N900

2011-08-03 1 min read Maemo N900
I was going through the post : http://talk.maemo.org/showthread.php?t=46739 and found the theme quite intruging but not complete to the point where I can download the deb file and install it in /usr/share/theme/ dir with simple commands “apt-get” or at max just use mkdir command to create the dir and dump everything in that dir. So, I wrote this couple of bash one liners to copy the required files to my N900. Continue reading
Older posts Newer posts