From e5fdc5afaf2e7e8c272f6379d80742b15c864be8 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 20 Feb 2019 15:00:24 -0800 Subject: [PATCH] Fixing pruning to keep last one --- scripts/prune.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/prune.sh b/scripts/prune.sh index a551998..45004dd 100755 --- a/scripts/prune.sh +++ b/scripts/prune.sh @@ -21,9 +21,7 @@ sed -i '1d' $torrents_csv_tmp # Sort by seeders desc (so when we remove dups it removes the lower seeder counts) # Remove dups, keeping the last ones -sort -r -t';' -k1,1 -o $torrents_csv_tmp $torrents_csv_tmp -sort -r -u -t';' -k1,1 -o $torrents_csv_tmp $torrents_csv_tmp - +tac $torrents_csv_tmp | sort -u -t';' -k1,1 -o $torrents_csv_tmp # Same for the infohashes scanned sort -u -o $scanned_out $scanned_out