I try to read the output of the bash command 'openssl help' and put it in a string variable for further processing.
To be precise I want to test all Cipher commands.
First I tried to read the output of the command 'openssl ciphers'. But I got only ciphers and not the cipher commands. But if I type 'openssl help' then the cipher commands are shown. The problem is that now the output of the command is not saved in my variable.
CIPHER=`openssl ciphers`
echo "Output:"
echo $CIPHER
This works. But unfortunately the content of $CIPHER is not what I need.
CIPHER=`openssl help`
echo "Output:"
echo $CIPHER
This doesnt work. The variable CIPHER is empty. Why??