then
nrOfBackups=$(ls -l ${backupMainDir} | grep -c ^d)
- if [ ${maxNrOfBackups} > ${nrOfBackups}} ]
+ if [ ${maxNrOfBackups} > ${nrOfBackups} ]
then
echo "Removing old backups..."
ls -t ${backupMainDir} | tail -$(( nrOfBackups - maxNrOfBackups )) | while read dirToRemove; do