Basically what I am trying to do is check stdout messages as they come in for an ip address. If the have an ip address then the entire line will be added to a list for further action later on. the format of the stdout message looks like the line below, though the ip address varies obviously.
"192.168.1.1 17Dec2020 string more-strings more-strings"
I would like to do something like:
for line in stdout.readlines():
if line.split()[0] is an ip address:
list.append(line)
and if the first split doesn't contain an ip address it should be ignored and proceed on to the next line.
I have every thing working I am just trying to add the "if statement" above to reduce some of the lines I have to work with. If possible I would prefer to avoid a regex, but I can certainly go that route if necessary.