I can run this command cat /home/norman/conf/second.txt | sort | uniq > /home/norman/conf/third.txt
but would like to use an os,system call or a subprocess call but whatever I have tried always causes an error.
I have tried such things as command = "cat /home/norman/conf/second.txt | sort | uniq > /home/norman/conf/third.txt".split()
subprocess.call(command)
but get
cat: '|': No such file or directory cat: sort: No such file or directory cat: '|': No such file or directory cat: uniq: No such file or directory cat: '>': No such file or directory