I want to get vsftpd version into shell variable. I can get it to console with ease:
# vsftpd -version vsftpd: version 2.2.2
Also I can get a lot of other info into variable:
# i=`bash --version 2>&1 | head -n1`; echo "=$i="; =GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)=
(please note output is between "=" signs). This simple way does not work with vsftpd:
# i=`vsftpd -version 2>&1`; echo "=$i="; vsftpd: version 2.2.2 ==
Please note $i is "" here.
What am I doing wrong?