It iterates via every single line with the output of the next command: netstat -aon this command will not be so useful as netstat -aof This feels so hacky that I like it. Thanks for your neat thought. Not quite "Pythonic", if you treatment about that sort of detail. This https://bookmarkingfeed.com/story20304051/top-latest-five-weed-in-belfast-urban-news