I have this code here
import subprocess
from time import strftime # Load just the strftime Module from Time
f = open('check_'+strftime("%Y-%m-%d")+'.log', 'w')
for server in open('check.txt'):
f.write(server.strip() + "\n")
subprocess.Popen(['plink', server.strip(), 'df','-k'],stdout=f)
What I would like to have is the output so it shows:
Server Name
Output
Server Name
Output
Currently it shows:
server name
server name
output
output
Thanks in advance