Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #24 from pittmesh/expr_math
Browse files Browse the repository at this point in the history
Run script with sh instead of ash (which will parse with ash by defau…
  • Loading branch information
colindean committed May 18, 2016
2 parents d52c27a + 6a60ac6 commit 136936f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm-mac2ipv4.ash → mm-mac2ipv4.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/ash
#!/bin/sh
#
# © 2016 Meta Mesh Wireless Communities. All rights reserved.
# Licensed under the terms of the MIT license.
Expand Down Expand Up @@ -87,6 +87,6 @@ ip2=$(printf "%d" "0x$mac4")
ip3=$(printf "%d" "0x$mac5")
ip4=$(printf "%d" "0x$mac6")

((ip2=ip2%64 + 64))
ip2=$(expr $ip2 % 64 + 64)

echo "$ip1.$ip2.$ip3.$ip4"

0 comments on commit 136936f

Please sign in to comment.