Advertisement
cd62131

Create Date

Feb 13th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. #!/bin/bash -e
  2. typeset -ig start=$(date -d '2013-01-01T00:00' +%s)
  3. typeset -ig goal=$(date -d '2014-01-01T00:00' +%s)
  4. rm -f DATETEST
  5. for ((; start <= goal; start += 3600)); do
  6.   echo $(date -d "@${start}" +'%Y%m%d %H:%M') >> DATETEST
  7. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement