convert bash shell script to python script
Revert "convert bash shell script to python script". Checkin wrongly.

This reverts commit 26ee0e087ef3664ac73361c146df468d652c1da6.