bash

Disable a few cores when you want to save power.

2012/12/28

If you have a lot of CPU power and working on battery. If you do not need that much of power and would like to rather save some battery power by disabling some cpus then you can use the below script. …

quick bash script for datewise backup of directory

2012/12/12

I was working on something and the data was very critical and needed backup. I wrote a bash script to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here …

Ignore CVS and svn directories in bash autocompletion.

2012/07/07

CVS and SVN directories are something that really cause lot of un-necessary nuisance. So, simple solution just ignore them 🙂

Array of all possible colors in bash script

2012/05/07

Sometime 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 - …

colors in bash scripts

2012/04/30

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 …

bash prompts — some good links

2012/03/08

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 …

Thumbnail

15 Linux Bash History Expansion Examples You Should Know

2012/03/02

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 …

Using file partially for filenames

2012/02/12

There are some commands that take file name and there are some case where you need to give file name. But there are some cases where you want to modify the file before passing it to the command. What …

better bash debugging

2011/09/16

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 …

bash completion

2011/08/09

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 …

faster bash operations on files with File Descriptors.

2011/06/11

I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with […] <td> <div class="text codecolorer"> while …

Unix shell script for removing duplicate files

2011/05/16

The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them (copy-paste from here): ::: updated on 02 …


This website uses cookies to ensure you get the best experience on our website. Learn more Got it