title: How does "sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n" work?
body: <p>I've come across this command which sorts the hosts file by ip, but I just can't break down the syntax so it would make sense. All I understood was that the first part means that the dot is used as delimeter, and then I got lost in all the commas and the rest of the arguments:  </p>
  
  <pre><code>$ sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n /etc/hosts
  
  127.0.0.1 localhost.localdomain localhost
  192.168.100.101 site1.com dev-db
  192.168.100.102 site2.com prod-db
  192.168.101.20  site3.com dev-web
  192.168.101.21  site4.com prod-web
  </code></pre>
  
  <p>Thanks.</p>