Fixed bash increment

master
Keith Irwin 2022-09-09 21:29:59 -06:00
parent e89625afdf
commit d16b029c71
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ used_ips="$(<<<"${ipv4s}" cut -d'.' -f3)\n$(<<<"${ipv6s}" cut -d'.' -f3)"
used_hostnumbers="$(<<<"${used_ips}" sort | uniq)"
hostnumber=1
while printf '%s' "${used_hostnumbers}" | grep "${hostnumber}"
do hostnumber++
do ((hostnumber++))
done
ipv4="${IPV4_NET%.*.*}.${usernumber}.${hostnumber}"
ipv6="${IPV6_NET%:*:*}:${usernumber}:${hostnumber}"