title: Sort data file in bash
body: <p>I am using sort in a bash script to order a file generated. An example of an input file is :</p>
  
  <pre><code>2,0,2165,5
  2,-10,2122,5
  2,10,2830,6
  2,-11,2121,5
  2,11,2903,6
  2,-1,2151,5
  2,1,2171,5
  2,-12,2114,5
  2,-13,2118,5
  2,-14,2121,5
  2,-2,2144,5
  2,2,2199,5
  </code></pre>
  
  <p>I need sorting on the first number and then the second, I tried the following:</p>
  
  <pre><code>sort -k1,1n -k2,2n data
  </code></pre>
  
  <p>The positive numbers are ordered as required, but the negative ones are dictionary ordered: </p>
  
  <pre><code>2,-10,2122,5
  2,-11,2121,5
  2,-1,2151,5
  2,-12,2114,5
  2,-13,2118,5
  2,-14,2121,5
  2,-2,2144,5
  2,0,2165,5
  2,1,2171,5
  2,2,2199,5
  2,10,2830,6
  2,11,2903,6
  </code></pre>
  
  <p>Could anyone help with this one?</p>