I want to execute echo and get an output like:
$ export EVAR="-E"
$ echo "$EVAR"
-E
I have stored "-E" in a bash variable, say $EVAR. If I execute echo $EVAR, echo will print out nothing. Perhaps it thinks $EVAR is an argument -E. Quoting $EVAR inside double quote marks doesn't work either.
How can I print it out?
NOTE: I imagine there could be a solution which is ignorant on the content of $EVAR - with no analysis on the content of $EVAR, a command like echo some-arg $EVAR. Is that possible? Or should I only turn to a workround like printf?