Updating prune to work for files too.
This commit is contained in:
parent
10875a8eaf
commit
559a55324c
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This prunes torrents.csv, removing those with too many columns, and sorts it
|
||||
echo "Pruning torrents.csv ..."
|
||||
pushd ..
|
||||
|
@ -50,6 +52,9 @@ cp $torrent_files_csv $torrent_files_csv_tmp
|
|||
header=$(head -n1 $torrent_files_csv_tmp)
|
||||
sed -i '1d' $torrent_files_csv_tmp
|
||||
|
||||
# Remove dups, keeping the last ones
|
||||
tac $torrent_files_csv_tmp | sort -u -t';' -k1,1 -k2,2 -o $torrent_files_csv_tmp
|
||||
|
||||
# Same for the infohashes scanned
|
||||
sort --field-separator=';' --key=1,2 -o $torrent_files_csv_tmp $torrent_files_csv_tmp
|
||||
|
||||
|
|
Loading…
Reference in New Issue