Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- date -d '1 hour ago' '+%Y-%m-%d'
- `Result` : 2017-11-13
- date -d '1 hour ago' '+%Y-%m-%d %H'
- Result : 2017-11-13 22
- date -d '1 hour ago' '+%H'
- 22
- date '+%H'
- 23
- start=$(date -d '2 hour ago' '+%H')
- end=$(date '+%H')
- file_name="dns."$start":00:00-"$end":00:00.log"
Add Comment
Please, Sign In to add comment