I have the following python code:
import subprocess
def disk():
for i in ('/tmp' , '/usr/mware' , '/var' , '/var/mware'):
df1 = subprocess.Popen(['df','-h', i], stdout=subprocess.PIPE).communicate()[0].split()
df1.remove("on")
print df1
disk()
I am getting the following output:
['Filesystem', 'Size', 'Used', 'Avail', 'Use%', 'Mounted', '/dev/mapper/rootvg-tmplv', '2.0G', '39M', '2.0G', '2%', '/tmp']
['Filesystem', 'Size', 'Used', 'Avail', 'Use%', 'Mounted', '/dev/mapper/appvg-usrmwarelv', '20G', '33M', '20G', '1%', '/usr/mware']
['Filesystem', 'Size', 'Used', 'Avail', 'Use%', 'Mounted', '/dev/mapper/rootvg-varlv', '10G', '3.8G', '6.3G', '38%', '/var']
['Filesystem', 'Size', 'Used', 'Avail', 'Use%', 'Mounted', '/dev/mapper/appvg-varmwarelv', '20G', '33M', '20G', '1%', '/var/mware']
I want to merge these lists and remove duplicates.