prunefilters.sh 213 B

123456789101112
  1. #!/bin/bash
  2. LIMIT="$(date "--date=3 months ago" +%s)"
  3. for filter in customfilters/*; do
  4. LASTREAD=$(grep '^Last Read' "${filter}" | cut -d : -f 2)
  5. if [[ $LASTREAD -lt $LIMIT ]]; then
  6. rm "${filter}"
  7. fi
  8. done