title: Get the third element of a line into a file with script shell
body: <p>I'm doing a script shell and I want to read data inside a file. In the file, I have something like :</p>
  <blockquote>
  <p>/path/to/file1 something 0</p>
  <p>/path/to/file2 something2 1</p>
  <p>/path/to/file3 something3 2</p>
  </blockquote>
  <p>What I want is to get the third element of the line but I don't know how to do it.
  In my code, I have:</p>
  <pre><code>while read line;
  do
      //must echo the third element of the line
  done &lt; file | sort -n -k 2 -t &quot; &quot;
  </code></pre>
  <p>I already tried with <code>awk</code> but it didn't work.</p>
  <p>How should I do please ?</p>