bin/bash function doPing () { pings=0 #cat ... The problem is that the pipe creates a subshell and ...
stackoverflow.com