Remove unused variables in shell scripts.
Summary:
Remove unused variables in shell scripts. Use _ where we don't care about the result.
Backport of core PR10771 and PR11649
https://github.com/bitcoin/bitcoin/pull/10771/files
https://github.com/bitcoin/bitcoin/pull/11649/files
Depends on D3955.
Not much change remaining as most of the files have been removed.
Test Plan:
Run the git-subtree-check.sh script. It will not output GOOD as we
made changes to all the subtree libraries (at least code formatting).
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3957