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:
parent
67577ee80b
commit
b5ee78c22d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue