title: How to Create New file every time with new output
body: <p>I have shell Script which is currently running in every 5 minutes (i configured in crontab) and sending all the output in same file. </p>
  
  <ul>
  <li>I want that in every 5 minute(when cronjob will exexute) the output of the script should be send in new file with "current_date_year_time.csv"</li>
  </ul>
  
  <p>Current Script</p>
  
  <pre><code>#!/bin/sh
  ipath=/usr/local/nextone/bin
  ifile=/var/tmp/EndpointUsage.csv
  "$ipath"/cli iedge list | awk '
  BEGIN { print "------------------------------------";
      printf "|%-17s|%-16s|\n","Registration ID", "Ongoing Calls"
    }
  /Registration ID/ { id = $3; next }
  /Ongoing Calls/ {print "------------------------------------"; printf  "|%-17s|%-16s|\n",id,$3 }
  END{
  print "------------------------------------";
  }'&gt;&gt; "$ifile"
  </code></pre>
  
  <p>Current output is coming like as below.</p>
  
  <pre>
  EndpointUsage.csv
  
  I want something like below.
  
  EndpointUsage_09:55-Am_09_05_2015.csv
  EndpointUsage_10.00-Am_09_05_2015.csv
  EndpointUsage_10:05-Am_09_05_2015.csv
  </pre>
  
  <p>Can anyone please help me on this. Thank you in advance.</p>