title: Unix sort rows based on semicolon
body: <p>I try to sort the following file:</p>
  
  <pre><code>$ cat testfile
  ZBOX-BATCH-SAMEDI;CMC10
  ZBOX-BATCH-SAMEDI_D1;HEB05
  ZBOX-BATCH-SAMEDI;BMD15
  ZBOX-BATCH-SAMEDI_D3;HEB03
  ZBOX-BATCH-SAMEDI_D3_M1;ODP47
  ZBOX-BATCH-SAMEDI_D1_M1;TER23
  ZBOX-BATCH-SAMEDI_D3;HEB02
  ZBOX-BATCH-SAMEDI_D1;HEB02
  ZBOX-BATCH-SAMEDI;DEA11
  ZBOX-BATCH-SAMEDI;DEA11A
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code>$ sort testfile
  ZBOX-BATCH-SAMEDI;BMD15
  ZBOX-BATCH-SAMEDI;CMC10
  ZBOX-BATCH-SAMEDI_D1;HEB02
  ZBOX-BATCH-SAMEDI_D1;HEB05
  ZBOX-BATCH-SAMEDI_D1_M1;TER23
  ZBOX-BATCH-SAMEDI_D3;HEB02
  ZBOX-BATCH-SAMEDI_D3;HEB03
  ZBOX-BATCH-SAMEDI_D3_M1;ODP47
  ZBOX-BATCH-SAMEDI;DEA11
  ZBOX-BATCH-SAMEDI;DEA11A
  </code></pre>
  
  <p>However, I was expecting:</p>
  
  <pre><code>ZBOX-BATCH-SAMEDI;BMD15
  ZBOX-BATCH-SAMEDI;CMC10
  ZBOX-BATCH-SAMEDI;DEA11
  ZBOX-BATCH-SAMEDI;DEA11A
  ...
  </code></pre>
  
  <p>That is, I want all the rows with the string <code>ZBOX-BATCH-SAMEDI</code> before the first semicolon to come first, then the ones with <code>ZBOX-BATCH-SAMEDI_D1</code>, etc.</p>
  
  <p>I looked <code>man sort</code> and I tried different options like <code>-g</code> and <code>-k</code> with <code>-t</code>, but I didn't manage. How can I do it?</p>