1
0

"don't pipe sed into sed" ~ wsj

This commit is contained in:
dtb 2022-10-22 09:41:39 -04:00
parent db30b4721d
commit dc2cbd543e

View File

@ -13,7 +13,7 @@ PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL"
printf "%s / %s\n" \
"$(curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL")" \
"$(curl -6 --connect-timeout 5 --silent "$PUBLIC_IP6_FETCH_URL")" \
| sed 's/ \/ $//g' \
| sed 's/^ \/ //g'
| sed -e 's/ \/ $//g' \
-e 's/^ \/ //g'
exit 0