Monthly Archives: December 2015

String manipulation tricks in bash

In some cases we have to modify the strings in a bash variable. Lets say : There are many files inside $(pwd)  with name as  a_ver10, b_ver10, c_ver10. We have to modify them back to a,b,c respectively. This below bash … Continue reading

Posted in HOWTO, SCRIPTING, TIPS & T RICS, TUTORIALS, Uncategorized | Tagged , | Leave a comment

Creating simple progress bar in shell / Python

Progressbar indicates if certain tasks are getting executed and when they completed. In bash oneliner: printf “Starting [“;for num in $(seq 50);do printf “#”;sleep 0.5;done;printf “] Successfull” In Python: sys.stdout.write(“Starting Operation[“) for d in range(60): sys.stdout.write(‘#’) sys.stdout.flush() time.sleep(0.50) sys.stdout.write(“]Stoping Operation”) … Continue reading

Posted in HOWTO, Programming, SCRIPTING, TIPS & T RICS, TUTORIALS, Uncategorized | Tagged , , | Leave a comment

Read and write json in python

In todays  world json is one of the easiest method of communication to exchange data. Its used everywhere Cloud APIs, Databases, Configuration files, REST Call. So below are the steps how to read and write back to a json file … Continue reading

Posted in ARTICLES, HOWTO, Programming, SCRIPTING, TIPS & T RICS, TUTORIALS, Uncategorized | Tagged , , | Leave a comment