Added script to clean up filter.txt

This commit is contained in:
Michael Grote 2022-06-18 11:06:16 +02:00
parent 318a22a694
commit d5b60afe75
2 changed files with 10 additions and 0 deletions

View File

@ -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.

View File

@ -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