Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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