i have a script like that
genhash --use-ssl -s $IP -p 443 --url $URL | grep MD5 | grep -c $MD5
i want to get stream generated by genhash in a variable, how do i redirect it into a variable $hash
to compare inside a conditional
if [ $hash -ne 0 ]
then echo KO
exit 0
else echo -n OK
exit 0
fi