1

Bash arrays that compare ip addresses.

view story
linux-howto

http://www.unix.com – I've been trying to have an array of ip addresses go through a loop one at a time. Then compare if the current element is in another array of ip addresses. I've traced my error with /bin/bash -x Code: + for c in '"${ip[@]}"' ./netk5: line 65: 50.17.231.23 23.64.146.110 23.64.159.139 107.14.36.129 31.13.74.7 173.194.77.95: syntax error: invalid arithmetic operator (error token is ".17.231.23 23.64.146.110 23.64.159.139 107.14.36.129 31.13.74.7 173.194.77.95") From what I found on Google it seems Bash isn't great at comparing floating point numbers. I saw some sugg (HowTos)