I've been struggling with this for awhile, wondering why all of my variables are null. Ijust realized the variables disappear after leaving this while loop.
Note that I'm piping to the while loop which makes a subshell Ibelieve which is the cause of the issue:
echo "$accounts"|while read thisline; do
(( ++counter ))
At all costs you ne........