i am writing a python script that will be invoked as follows: myScript.py <an IP>
and the script is as follwos: x = "Device " + sys.argv[1] + " restored the database" y = "Created connection to " + sys.argv[1] cmd_line = Popen(["egrep", "(x,y)", aLogFile], stdout=PIPE, stdin=PIPE, stderr=STDOUT) the above code does not work because it will look for x and y in aLogFile instead of looking for <"Device " + sys.argv[1] + " restored the database"> and <"Created connection to " + sys.argv[1]> Any hint is appreciated.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor