if sys.argv[4] == 'state': try: print(sys.argv[5]) except: print "Error gathering server state ", sys.argv[5]
I invoke the python program with myscript.py option1, 2, 3, etc
The fifth argument is a server with a numeric range:
server1,server2,server3, etc.
Instead of wrapping the script, I would like to be able to feed a range to the script instead.
For example, right now all I can do is myscript.py server1, myscript.py server2
I would like to be able to pass myscript.py server1-20 and it would execute the command on all 20 servers.
Any suggestions are appreciated.

New Topic/Question
Reply




MultiQuote






|