bash

bash refer parameters from the current command

2014/09/15

In bash you can use !# to refer to any parameter from the current command, example:

Debuggging bash cron scripts.

2014/09/01

I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the …

Thumbnail

bash debug – log all executed commands

2014/02/03

Whenever I am writing a script in perl or bash, I always wish that there was some way to have all the commands logged or output to screen. I know there is “set -x” option to have debugging enabled, …

bash – using the vi mode more effectively.

2013/11/22

You can first set the bash mode to vi. This will enable some vim like features to bash. So, add this to .bashrc : set -o vi Once, you have done that then its time to get more out of the vi mode. …

bashrc with lots of functions and useful alias

2013/10/30

Here is a link of a useful 10K lines bashrc http://pastebin.com/LEkXXuST You may not want to put the whole thing, but get an idea and use what you think can be helpful to you or at-least get an idea. …

poor mans watch, watch for solaris

2013/01/01

Here is a simple script that you can use as watch in Solaris as well.

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 …


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