bash

shopt causes bash completion to stop working.

2011/01/25

Couple of days, I added some scripts to my bash startup and suddenly realized that bash completions stopped working. This is tricky situation in bash to figure out what went wrong. So, I set my foot …

Find all the missing paths in the PATH variable in bash script

2011/01/20

Here is a simple script that will list out all the paths in the PATH variable that do not exist.

bash 4.0 – new feature mapfile

2011/01/14

Recently I encountered a problem where I had to create couple of arrays in bash and these were quite dynamic in nature. This script was supposed to be used by couple of guys whom I did not trust too …

perl is faster than bash in some cases.

2011/01/11

Some days back, I had to generate some data to be uploaded to a database. As usual I assumed that bash should be faster and hence wrote the script to create the files in bash. But I found that even …

Shell Scripting

2011/01/05

Here are some links for bash programming that you may find useful. http://tips-linux.net/en/content/pro-bash-programming http://tips-linux.net/en/content/expert-shell-scripting …

Thumbnail

Bash Script Beautifier

2010/12/23

<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a …

intercept stdout/stderr of another process or disowned process

2010/11/23

The command is definately going to save your day if you have disowned the process by mistake. Only uses strace so might as well work on Solaris also, though not tried it. intercept stdout/stderr of …

Broadcast your shell thru port 5000

2010/11/20

Broadcast your shell thru port 5000 […] <td> <div class="text codecolorer"> mkfifo /tmp/fifo;(nc -q0 -l 5000 < /tmp/fifo &);script -f /tmp/fifo </div> …

Screen enable/disable logging in all windows

2010/11/19

If you use screen command a lot then this is something that you will like πŸ™‚ Screen enable/disable loggin in all windows […] <td> <div class="text codecolorer"> bindkey ^l …

function for copy files with progress bar (using pv – pipe viewer)

2010/11/11

function for copy files with progress bar (using pv – pipe viewer) […] <td> <div class="text codecolorer"> &nbsp;cp_p() { if [ `echo "$2" | grep …

Print all environment variables, including hidden ones

2010/11/09

Print all environment variables, including hidden ones […] <td> <div class="text codecolorer"> for _a in {A..Z} {a..z};do _z=${!${_a}*};for _i in `eval echo …

Quick tip on zipping logs in real time.

2010/10/13

Sometimes, some small things that we don’t actually think can be useful are such useful. I faced this couple of days back when I was working on something and the amount of logs getting generated and …


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