I'm making a bash script to do basic arthmetic and when I do:
if [ $2 == "*" ]
it does not work.
How can I check for asterisk?
You need to escape or quote the asterisk in the command line:
and enclose the
The problem isn't that the
So if your script was called
To avoid expansion, you would need to do
You might want to consider
Find ASCII value of
and use that value for condition checking.