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
echo
echo "DONE!"
-echo "Backup created: ${backupdir}"
\ No newline at end of file
+echo "Backup created: ${backupdir}"