diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index 0b922d6..498f9c4 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -7,3 +7,8 @@ for i in "${empties[@]}";do rm -f "${i}" rm -f "${i/.csv/}" done + +if [[ "$(find ${PROCESSED} | wc -l)" -ge 100 ]];then + ls -1t . | tail -n +100 | xargs -r rm -vv +else +