Ignore CVS and svn directories in bash autocompletion.
CVS and SVN directories are something that really cause lot of un-necessary nuisance. So, simple solution just ignore them π
export FIGNORE=CVS:~:.o:.svn bind 'set match-hidden-files off'
CVS and SVN directories are something that really cause lot of un-necessary nuisance. So, simple solution just ignore them π
export FIGNORE=CVS:~:.o:.svn bind 'set match-hidden-files off'

If you have done a new installation of Ubuntu or Fedora, then yuou know you have to search all kind of blogs to find out what all to install. So, here is a easier way to do that. Just run this script, it will install some applications which are mostly a βMUSTβ for all the installations. And the list of applications that are installed are :
Continue readingInstall the utility:
sudo yum install rpmconf
Description:
- Description : This tool search for .rpmnew, .rpmsave and .rpmorig files and ask you what to do
- with them:
- Keep current version, place back old version, watch the diff or merge.
And finally run the utility:
sudo rpmconf -a
and if there is a conflict or rpmsave or rpmnew file, then you will see something like this:
Continue readingFirst of all, install symlinks if it is not installed :
sudo yum install symlinks
and here is the description:
- Description : The symlinks utility performs maintenance on symbolic links.
- Symlinks checks for symlink problems, including dangling symlinks
- which point to nonexistent files.Β Symlinks can also automatically
- convert absolute symlinks to relative symlinks.
- Install the symlinks package if you need a program for maintaining
- symlinks on your system.
and the help for the same:
Continue readingSometime back, we had looked at using colors in bash script and here is a way to create a array of all the colors.
#!/bin/bash -
#===============================================================================
#
# FILE: colorarray.sh
#
# USAGE: ./colorarray.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
# COMPANY: Roamware India Pvt Ltd
# CREATED: 16/04/12 17:24:09 IST
# Last modified: Mon Apr 16, 2012 05:39PM
# REVISION: ---
#===============================================================================
count=0
for i in 40m 41m 42m 43m 44m 45m 46m 47m
do
for l in 0 1
do
echo -n "l=$l "
for k in 0 1
do
# echo -n "k=$k "
for j in {30..37}
do
carr[$count]="\033[$k;$j;$l;$i"
echo -ne "${carr[$count]}$count \033[00m"
((count++))
done
done
echo
done
echo
done
You can add this script to any script of your choice and you have all the 256 colors available to you in the script without additional coding. Happy coding.
Continue reading
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 readingHere 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