I do have following script to capture the command line arguments. Third option for batch size is not being set any idea ? FYI : Only input & ouput file options are required parameter. Batch is optional.
import sys, getopt
import os
try:
opts, args = getopt.getopt(argv,"hi:o:b",["ifile=","ofile=","bsize="])
except getopt.GetoptError:
print 'file.py -i <inputfile> -o <outputfile> -b<batchsize>[default=20000000]'
sys.exit(2)
for opt, arg in opts:
print opt
if opt == '-h':
print 'file.py -i <inputfile> -o <outputfile> -b<batchsize>[default=20000000]'
sys.exit()
elif opt in ("-i", "--ifile"):
inputFile = arg
elif opt in ("-o", "--ofile"):
outputFile = arg
elif opt in ("-b", "--bsize"):
print "Another option %s" % opt
batchsize = arg