Skip to content

Commit

Permalink
zsh script for updating blocklist.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mw98 authored Nov 29, 2021
1 parent 4070420 commit a818ada
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions update_blocklist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
query=${1:l}
echo $1
echo $query
if [[ $query != '' ]]; then
if grep -q $query blocklist.txt; then
sed -e "/^$query$/d" -i '' blocklist.txt
else
echo $query >> blocklist.txt
fi
fi

0 comments on commit a818ada

Please sign in to comment.