Jafner.net/dotfiles/sieve/important_compose.sh

14 lines
393 B
Bash
Raw Normal View History

2024-06-04 03:04:47 -07:00
#!/bin/bash
# create the domains variable as a list of space-separated, double-quoted domains
# one per line from the important_domains.txt file
sort -u -o important_domains.txt important_domains.txt
domains=""
while IFS= read -r line; do
domains+="\"$line\", "
done < <(cat "important_domains.txt")
domains="${domains%, }"
sed "s/important_domains/${domains}/g" important_script.txt