title: Unix one-liner to swap/transpose two lines in multiple text files?
body: <p>I wish to swap or transpose pairs of lines according to their line-numbers (e.g., switching the positions of lines 10 and 15) in multiple text files using a UNIX tool such as sed or awk.</p>
  
  <p>For example, I believe this sed command should swap lines 14 and 26 in a single file:</p>
  
  <pre><code>sed -n '14p' infile_name &gt; outfile_name
  sed -n '26p' infile_name &gt;&gt; outfile_name
  </code></pre>
  
  <p>How can this be extended to work on multiple files? Any one-liner solutions welcome.</p>