Posted By

mprabhuram on 07/26/10


Tagged

UnixScripts


Versions (?)

Add date and time to filename


 / Published in: Bash
 

URL: http://www.cyberciti.biz/tips/shell-scripting-creating-reportlog-file-names-with-date-in-filename.html

  1. #take backup
  2.  
  3. NOW=$(date +"%b-%d-%y%H:%M")
  4. BKPFILE="hadoop-env-$NOW.sh"
  5. echo $BKPFILE
  6. cp hadoop-env.sh "$BKPFILE"

Report this snippet  

You need to login to post a comment.