Skip to content

Instantly share code, notes, and snippets.

@dahdahm
Forked from juanpabloaj/lastDays.sh
Last active December 19, 2015 10:39
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 dahdahm/5941652 to your computer and use it in GitHub Desktop.
Save dahdahm/5941652 to your computer and use it in GitHub Desktop.
#!/bin/bash
a=""
b=""
for i in $(seq 0 $1)
do
b=$(git diff --shortstat "@{ $i day ago }")
if [[ "$b" != "$a" ]]; then
echo $(date --date="$i days ago" +%F) $b
fi
a=$b
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment