title: Sort CSV file by multiple columns using the "sort" command
body: <p>I have a CSV-like file, and I would like to sort it by column priority, like <a href="https://dev.mysql.com/doc/refman/8.0/en/sorting-rows.html" rel="nofollow noreferrer">&quot;ORDER BY&quot; in SQL</a>. For example, given the following rows,</p>
  <pre><code>3;1;2
  1;3;2
  1;2;3
  2;3;1
  2;1;3
  3;2;1
  </code></pre>
  <p>If &quot;ORDER BY&quot; were <code>column2, column1, column3</code>, the result would be:</p>
  <pre><code>2;1;3
  3;1;2
  1;2;3
  3;2;1
  1;3;2
  2;3;1
  </code></pre>
  <p>I'd like to know how to get this same result using the <code>sort</code> command on Unix.</p>