title: help on sorting a file using sort
body: <p>I have this file:</p>
  
  <pre><code>100: pattern1
  ++++++++++++++++++++
  1:pattern2
  9:pattern2
  +++++++++++++++++++
  79: pattern1
  61: pattern1
  +++++++++++++++++++
  </code></pre>
  
  <p>and I want to sort it like this:</p>
  
  <pre><code>++++++++++++++++++++
  1:pattern2
  9:pattern2
  +++++++++++++++++++
  61:pattern1
  79:pattern1
  100:pattern1
  +++++++++++++++++++
  </code></pre>
  
  <p>Is it possible using Linux sort command only ?</p>
  
  <p>If I had :</p>
  
  <pre><code>4:pat1 
  3:pat2
  2:pat2
  1:pat1
  </code></pre>
  
  <p>O/p should be:</p>
  
  <pre><code>1:pat1
  ++++++++++++ 
  2:pat2
  3:pat2
  ++++++++++++
  4:pat1
  </code></pre>
  
  <p>So,  want to sort on first group, but "group" on the pattern of second group.
  Please note, the thing after : is a regex pattern not a literal.</p>