How to assign * asterisk to variable?

How can I assign asterisk to variable
I have try a="\* " but I was not succesful :frowning:
any idea ?
thanks

% v=*; echo "$v"
*

did you mean $* ?
or

var='*'
echo "$var"

or

var="*"
echo "$var"

var="\"
echo $var
---------------------
or
var='\
'
echo $var

Radoulov is right. Just use:

var=*

Actually, it's the opposite: you don't need the first pair of quotes (it makes no harm, but as filename generation/globbing is not performed in this context, they are redundant) and you need to quote the second statement (because in that context in most shells the pattern is subject to filename generation):

var=*
echo "$var"