iDatamining.org

I am looking for projects to work on
Please contact with me at yiyu.jia@iDataMining.org!

Monday, February 18, 2013

Removing Sencha Eclipse plugin license file from my linux platform


I am using spket eclipse plugin for editing ExtJS code. But, I tried Sencha Eclipse plugin before. I need to delete some directories and files if I want to completely remove Sencha Eclipse plugin.

For example, I need to remove its license file as below,

rm $HOME/.local/share/Sencha/.ftp


Btw, I am listing two books about ExtJS 4.x here. I am happy to serve as technical reviewer for these two books. They will save your time that costs more money than these books.

Saturday, February 9, 2013

shell script to block main script exit before all other spined backend script exit.

Sometimes, we need to write shell script to spin multiple process running parallel. Also, we want to wait all parallel process finish before we can process to next step. How to achieve this? Below is a simple Bash shell sample script to do this.

n=10
for ((i=1; i < $n; i++));
 do
 #compose the command
 realCmd="nohup yourCmdWithArguments >/dev/null 2>&1 &"
 #excute the command
 eval $realCmd
 #store command pid in an array.
  pidArray[$i]=$!
done

#wait for each process to be done
for ((i=1;i<$n;i++));
 do
   wait ${pidArray[$i]}
done

#continue to do next step that depends on results of all nohup spin processes above.