Originally Posted by mrjoli021
I am running the script below and I keep getting
"line 18: [: eq: binary operator expected"
I have checked the variables and when I do an echo on them they print as 10 both of them.
Try putting a hyphen before the eq
Also it's good practice to put double quotes around the variables, e.g.
if [ "$packetsReceived" -eq "$packetsTransmitted" ]; then
For debugging, put a set -x
before the offending line, and a set +x
after it. This way, the shell will give you some detail about what it's doing.