Update ipprefix_by_netmask.sh (#866)

When code was moved from terraform template to separate file, "$$" (used to print $ on a tf template) was wrongly left behind.
This commit is contained in:
Simone Ruffilli 2022-10-09 17:26:54 +02:00 committed by GitHub
parent 67577ee80b
commit b5ee78c22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
# limitations under the License.
# https://stackoverflow.com/questions/50413579/bash-convert-netmask-in-cidr-notation
c=0 x=0$(printf '%o' $${1//./ })
c=0 x=0$(printf '%o' ${1//./ })
while [ $x -gt 0 ]; do
let c+=$((x % 2)) 'x>>=1'
done