How can I echo
the literal string -e
and nothing else?
I'm trying to better understand how shell arguments are escaped.
The following commands do not work:
echo -e # prints nothing
echo '-e' # prints nothing
echo "-e" # prints nothing
echo -e # prints nothing
echo \-e # prints -e
echo '-e' # prints -e
echo "'-e'" # prints '-e' (with quotes)
echo -- -e # prints -- -e
I can't find one that doesn't either include quotes or a leading slash.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…