Skip to content

Instantly share code, notes, and snippets.

View lastDays.sh
#!/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