In bash script, I have a variable, say $date, that obtained string value from some other function, say the value of $date is 04 Feb 2020. I want to mosquitto_pub the value in $date, but it can't because mosquitto_pub expect no space after 04. I understand that I have to put the double quote around 04 Feb 2020 (as if $date='"04 Feb 2020"'), how to do it?
Thanks