I want to execute echo and get an output like:$ export EVAR=-E$ echo $EVAR-EI 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?
How to print out -E in bash echo?
bash;echo
You could use tricks:echo  $EVARecho  -e \055Eecho $'\055E'But as I said: those are tricks. The real solution is to use printf always:$ printf '%s\n' $EVAR-E