title: Shell script to find files after certain modified date and sort them in order of modified date
body: <p>I am trying to find all files after certain modified date from a directory in the sorting order of modified date using shell script. This is one of the part of my current shell script. </p>
  
  <p>Condition contains two steps: 1) Fetch files from a directory after certain modified date.
  2) sort the files by modified date.</p>
  
  <p>Current directory contains files like this:</p>
  
  <pre><code>Mar 28 11:14 file_H_1
  Apr  2 16:37 file_K_2
  Apr  1 21:43 file_H_3
  Apr 16 19:16 file_H_4
  Apr 16 21:00 file_H_5
  Apr 16 12:00 file_L_6
  Apr  9 14:08 file_B_7
  Apr  4 00:39 file_H_8
  Apr  4 00:39 file_H_9
  Apr  4 00:39 file_C_10
  Apr  4 00:39 file_H_11
  Mar 27 14:39 file_H_12
  </code></pre>
  
  <p>I want final output as a list of files with modified date after "2018-04-09 00:00:00" and in order by modified date.
  OUTPUT should be:</p>
  
  <pre><code>file_B_7
  file_L_6
  file_H_4
  file_H_5
  </code></pre>
  
  <p>I tried this:<br>
  1) For getting files after certain modified date</p>
  
  <pre><code>find . -type f -newermt "2018-04-09 00:00:00"
  OUTPUT of this:
  file_L_6
  file_H_5
  file_B_7
  file_H_4
  </code></pre>
  
  <p>2) order the files on modified date</p>
  
  <pre><code>ls -lt
  OUTPUT of this
  Apr 16 21:00 file_H_5
  Apr 16 19:16 file_H_4
  Apr 16 12:00 file_L_6
  Apr  9 14:08 file_B_7
  Apr  4 00:39 file_H_8
  Apr  4 00:39 file_H_9
  Apr  4 00:39 file_C_10
  Apr  4 00:39 file_H_11
  Apr  2 16:37 file_K_2
  Apr  1 21:43 file_H_3
  Mar 28 11:14 file_H_1
  Mar 27 14:39 file_H_12
  </code></pre>
  
  <p>But I am struggling to combine these two conditions.</p>
  
  <p>I tried this also but it is sorting on file name not on modified date:</p>
  
  <pre><code>find . -type f -newermt "2018-04-9 00:00:00" | sort -n | while read file_name; do
  echo file=$file_name
  done
      OUTPUT of this:
      file_B_7
      file_H_4
      file_H_5
      file_L_6
  </code></pre>
  
  <p>Please suggest some solution.</p>