Using Debian 12 stable.
The following echo works as expected, ie. the hardcode label and the result of the expression are displayed in the same line
echo "unzip version: $(unzip -v | head -1)"
# unzip version: UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
echo "JQ version....: $(jq --version)"
#JQ version....: jq-1.6
However for some utilities, their console version output seems to interfere with echo. The display is split in two lines in wrong order:
echo "dig version: $(dig -v)"
#DiG 9.18.28-1~deb12u2-Debian
#dig version:
printf "dig version%s\n" $(dig -v)
#DiG 9.18.28-1~deb12u2-Debian
#dig version
echo "SSMTP version: $(ssmtp -V)"
sSMTP 2.64 (Not sendmail at all)
SSMTP version:
Capture the result in a variable doesn't work either
DIG_VERSION="$(dig -v)"
# DiG 9.18.28-1~deb12u2-Debian
echo "Dig Version: --->$DIG_VERSION<---"
Dig Version: ---><---
What is the reason and hopefully there is a fix.