diff --git a/README.md b/README.md index a0dd448..16c0e5f 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ heise.de::TechStage | ## Misc - [tborychowski/miniflux-filter](https://github.com/tborychowski/miniflux-filter) - [jqplay.org](https://jqplay.org) +- To clean up your `filter.txt` you can use the following script: `./sort_and_remove_double_lines.sh` ### Debug If `MF_DEBUG` is set to `1`, `miniflux-filter` will print extra output to stdout. diff --git a/sort_and_remove_double_entries.sh b/sort_and_remove_double_entries.sh new file mode 100755 index 0000000..876c3b2 --- /dev/null +++ b/sort_and_remove_double_entries.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +FILTERFILE=./filter.txt +VORHER=$(wc -l < $FILTERFILE) +echo Sortiere und filtere doppelte Zeilen heraus. +sort filter.txt | uniq -u -i | cat > .tmp +NACHHER=$(wc -l < .tmp) +echo Es wurden $((VORHER-NACHHER)) Zeilen entfernt! +mv -f .tmp filter.txt