Define current datetime in a variable


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. b$ current_datetime=$(date '+%Y%m%d_%H%M%S')
  2. b$ echo $current_datetime
  3. 20080722_162914

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.