title: Cut one word before delimiter - Bash
body: <p>How do I use <code>cut</code> to get one word before the delimiter? For example, I have the line below in <code>file.txt</code>:</p>
  
  <blockquote>
    <p>one two three four five: six seven</p>
  </blockquote>
  
  <p>when I use the <code>cut</code> command below:</p>
  
  <pre><code>cat file.txt | cut -d ':' -f1
  </code></pre>
  
  <p>...then I get everything before the delimiter; i.e.:</p>
  
  <blockquote>
    <p>one two three four five</p>
  </blockquote>
  
  <p>...but I only want to get "five"</p>
  
  <p>I do not want to use <code>awk</code> or the position, because the file changes all the time and the position of "five" can be anywhere. The only thing fixed is that five will have a ":" delimiter.</p>
  
  <p>Thanks!</p>