title: Date Comparison in file Shell Scripting
body: <p><a href="https://i.stack.imgur.com/1uWui.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1uWui.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/EgVRi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EgVRi.png" alt="enter image description here"></a>[I have a file which has second column date in format mm/dd/yyyy.</p>
  
  <pre><code>ASVC038M8  09/10/2019
  ASVC066M8  11/04/2020
  ASVC075M8  11/07/2024
  ASVC068M8  11/08/2020
  ASVC069M8  11/13/2020
  ASVC070M8  11/14/2020
  ASVC047M8  12/08/2019
  ASVC051M8  12/08/2019
  ASVC037M8  12/21/2019
  ASVC052M8  12/21/2019
  ASVC043M8  12/28/2019
  ASVC040M8  12/28/2019
  </code></pre>
  
  <p>I want to get information for those entries which have date more than 35 Days ago..
  My current code is </p>
  
  <pre><code>Date=$(date +"%m/%d/%y" -d "+35 days")
  
  cat test.txt | awk -v date="$Date" '$2  &gt; date { print $1"  "$2 }')
  </code></pre>
  
  <p>In this, I am getting the output as</p>
  
  <pre><code>ASVC043M8  12/28/2019
  ASVC040M8  12/28/2019
  </code></pre>
  
  <p>Not sure why I am not getting all the entries as there are few more entries which have a date more than 35 days ago.</p>
  
  <p>Help, please.</p>
  
  <p>thanks in advance.</p>