Сценарий Bash для удаления каталогов старше 5 дней?

#!/bin/bash exec 3>&1 4>&2 trap 'exec 2>&4 1>&3' 0 1 2 3 exec 1>>/var/log/folderpurge.log 2>&1 date ########################### # Self Explanatory printf # ########################### if [[ ! $EUID == 0 ]]; then echo "This script must be run as root." exit 1 fi ######################################################################## # Check the current local(nix) folder size before initiating the purge # ######################################################################## if [ -e /home/s3user/extractedISOs/ ] && [ $(du -hsm /home/s3user/extractedISOs | awk '{print $1}' -gt $((1024*50)) ] then echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "| The extractedISOs folder exists and it is greater than 50GB |" echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "++++++++++++++++++++" echo "| INITIATING PURGE |" echo "++++++++++++++++++++" #foldpurg=$(find /home/s3user/extractedISOs/* -type d -ctime +5 -exec rm -rf {} \;); foldpurg=$(find /home/s3user/extractedISOs/* -type d -ctime +5 | xargs rm -rf); else exit fi exit 0 **Error at line 20 and 35?** 

Linux и Unix - лучшая ОС в мире.