title: How can I convert to date format (DD MMM YYYY) using the shell?
body: <p>I have data in a file where one column is a date column which has date in the following format:</p>
  <pre><code>2021-05-10T18:25:00.000+0100
  2021-05-14T18:25:00.000+0100
  2021-05-19T18:25:00.000+0100
  </code></pre>
  <p><strong>Expected output is:</strong></p>
  <pre><code>10 MAY 2021
  14 MAY 2021
  19 MAY 2021
  </code></pre>
  <p><strong>My approach which I've tried:</strong></p>
  <pre><code>while -r read line
  do
      year=`echo $line | awk '{ print $1 }' `
      month=`echo $line | awk '{ print $2 }' `
      dt=`echo $line | awk '{ print $3 }' `
  
      v=$dt&quot;-&quot;$month&quot;-&quot;$year
      d=date '`$v' | dd-mm-yyyy
      echo $d
  done &lt; /f/filename.txt
  </code></pre>