Created
February 1, 2022 02:06
-
-
Save liamkinne/84194ff1f00e923b308c0850ce21a19e to your computer and use it in GitHub Desktop.
Convert CSV of Uptime.com probe servers to Squid proxy config format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
read # ignore first line | |
while IFS=, read -r name location address address_ipv6 | |
do | |
printf "%-18s %-15s %-20s\n" "acl whitelist src" "$address" "# $name" | |
done | |
} < probe-servers.csv # default file name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output should look something like this