#! /usr/bin/env bash MONTH=`date +%m --date "a month ago"` grep "^$MONTH-" \##pim.log > $MONTH-pim.log