All IP address written in the file line by line and it will be executed by given command line. I want to save the result to each file with file's name is standing by each IP.
with open(list) as l:
for line in l:
file = line+".txt"
os.system("whois "+line+" >> "+file)
list contains:
192.168.0.1
192.168.0.2
192.168.0.3
Errors:
sh: 3: .txt: not found
sh: 3: .txt: not found
sh: 3: .txt: not found