title: sort unique urls from log
body: <p>I need to get the unique URLs from a web log and then sort them. I was thinking of using grep, uniq, sort command and output this to another file</p>
  
  <p>I executed this command:</p>
  
  <pre><code>cat access.log | awk '{print $7}' &gt; url.txt
  </code></pre>
  
  <p>then only get the unique one and sort them:</p>
  
  <pre><code>cat url.txt | uniq | sort &gt; urls.txt
  </code></pre>
  
  <p>The problem is that I can see duplicates, even though the file is sorted which means my command worked. Why?</p>