title: How can I use sort command to sort the log file only by the first field in Linux?
body: <p>I have a log file named <code>a.log</code> !  I want sort it by the fisrt field ! If two lines have the same field , the order will be original contens‘！
  contents:</p>
  
  <pre><code> 1. 101  c
   2. 100  b
   3. 100  a
   4. 2    d
  </code></pre>
  
  <p>I expect the result:</p>
  
  <pre><code> 1. 2    d
   2. 100  b
   3. 100  a
   4. 101  c
  </code></pre>
  
  <p>So  i use this command!</p>
  
  <pre><code>sort -nt 't' -k 1 a.log 
  </code></pre>
  
  <p>But the result is :</p>
  
  <pre><code> 1. 2    d
   2. 100  a
   3. 100  b
   4. 101  c
  </code></pre>
  
  <p>Thanks very much！</p>