title: Display all fields except the last
body: <p>I have a file as show below</p>
  
  <pre><code>1.2.3.4.ask
  sanma.nam.sam
  c.d.b.test
  </code></pre>
  
  <p>I want to remove the last field from each line, the delimiter is <code>.</code> and the number of fields are not constant.</p>
  
  <p>Can anybody help me with an <code>awk</code> or <code>sed</code> to find out the solution. I can't use <code>perl</code> here. </p>