I just noticed that it seems like the flag -e
does not exist for the echo
command in my shell on Linux.
Is this just a messed up setting or is it "normal"?
Some code as an example:
#!/bin/sh
echo -e "\e[3;12r\e[3H"
Prints:
-e \e[3;12r\e[3H
This worked before! I guess some stty
commands went terribly wrong and now it does not work anymore. Somebody suggested that my sh
was actually just bash
.
Best Answer
Because you used
sh
, notbash
, thenecho
command insh
doesn't have option-e
. Fromsh
manpage:And it doesn't have
\e
, too: