Two possible paths here: split the command into two parts, and use BASH to compare, or write a composite line. Either way, better to use the $(command) instead of backticks.
Splitting the command
SVC_VER=$(getserversion.py)
CLI_VER=$(getcliversion.py)
if [ "$SVC_VER" = "$CLI_VER" ] ; then
...
fi
Or, combining them into single command line
MATCH=$(getversions.py | grep $(getcliversion.py))
Note that it's not possible to use the backticks for the second command, as the back ticks do not support nesting of commands.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…