Fixed bug where CMDEXITCODE was not set in run() function,
and RCMDEXITCODE in rrun(), when the optional last parameter,
the 'grep string', was used.
Specifying this optional parameter changes the behavior related
to the exit code for run() and rrun() as intended. However, the
CMDEXITCODE and RCMDEXITCODE were not being set when the 'grep string'
parameter was used.
An impact of this was that sdp_sync.sh in HMS, after a recent
change to make it shellcheck compliant, was broken, causing it
to fail to detect 'p4 status' changes, as it relied on RCMDEXITCODE
to be set appropriately when the 'grep string' was used.
This change fixes the problem. CMDEXITCODE is now set reliably,
even when the 'grep string' paramater is used in run(). Likewise
RCMDEXITCODE is now set reliably in rrun().