Skip to content

Instantly share code, notes, and snippets.

@alloydwhitlock
Created November 4, 2014 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alloydwhitlock/71bdaf4aa5db61f4ed1c to your computer and use it in GitHub Desktop.
Save alloydwhitlock/71bdaf4aa5db61f4ed1c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Name: date_offset.sh
# Description Subtract offset days from current epoch date
#
# Last Update: 11/04/2014
# How many days back
day_offset="49"
# Offset date by day_offset
offset_date="$(date -j -v-${dayoffset}d +%s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment