From d25a1b261d9f643436efae03b50b83d21d214abf Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Sat, 15 Feb 2014 09:42:22 -0500 Subject: [PATCH] Rename to exponential_backups --- binary_backups.sh => exponential_backups.sh | 2 +- test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename binary_backups.sh => exponential_backups.sh (99%) diff --git a/binary_backups.sh b/exponential_backups.sh similarity index 99% rename from binary_backups.sh rename to exponential_backups.sh index 1864e8b..839f45b 100755 --- a/binary_backups.sh +++ b/exponential_backups.sh @@ -53,7 +53,7 @@ OPTIONS: -h Show this message -i FILE Read candidate backup dates from FILE instead of stdin -d DATE Calculate which backups should be kept from this date instead of - today + today -r Reverse which dates are displayed (show those which should be deleted instead of kept) EOF diff --git a/test.sh b/test.sh index 26d0a72..d80ddef 100755 --- a/test.sh +++ b/test.sh @@ -4,7 +4,7 @@ touch test_results for (( ago=100; ago>=0; ago-- )); do backup_date=$( date -I -d "$ago days ago") echo $backup_date >> test_latest - grep -v "_" test_latest | ./binary_backups.sh -r -d "$backup_date" | xargs -I "{}" sed -ri "s/{}/__________/g" test_latest + grep -v "_" test_latest | ./exponential_backups.sh -r -d "$backup_date" | xargs -I "{}" sed -ri "s/{}/__________/g" test_latest mv test_results test_results_old paste -d " " test_latest test_results_old > test_results done