Open westbywest opened 6 years ago
https://github.com/pittmesh/ip-calculator/blob/954e2e39cce62a66f687337f42e0d82a8725f6f9/mm-mac2ipv4.sh#L90 The javascript ipcalc script computes this as arr[0] %= 32 + 96; To have the same order of operations, shell script usage would have to be ip2=$(expr $ip2 % $(expr 32 + 96))
arr[0] %= 32 + 96;
ip2=$(expr $ip2 % $(expr 32 + 96))
Nice catch. Mind doing up a PR?
@westbywest Can you make a PR?
Soon (tm)
https://github.com/pittmesh/ip-calculator/blob/954e2e39cce62a66f687337f42e0d82a8725f6f9/mm-mac2ipv4.sh#L90 The javascript ipcalc script computes this as
arr[0] %= 32 + 96;
To have the same order of operations, shell script usage would have to beip2=$(expr $ip2 % $(expr 32 + 96))