title: How should I use the sort command using python?
body: <p>I have a bunch of different text files, and am trying to sort the texts into one file. I am using python's subprocess, and I wrote the following code</p>
  
  <pre><code>command_line = "sort -m 1.txt 2.txt &gt; a.txt"
  args = shlex.split(command_line)
  subprocess.call(args)
  </code></pre>
  
  <p>and the subprocess.call(args) returned 2 as a result, and nothing was written in a.txt. Anything wrong with my code?</p>