help echo
-e enable interpretation of the following backslash escapes ...
If your code doesn't need to interpret backslash escapes then you can safely remove the -e flag.
Sometimes, people tend to use -e just for interpreting \n as newline. If that's the case, know that you can have multiline strings just by quoting them and writing as it is. An example:
var="Hi, I am a multiline string"
But if you do need to interpret backslash escapes, then using printf will be your best bet.
Though I would recommend using printf whether you need backslash interpretation or not.
With printf:
printf "%s\n" "$var" # no backslash interpretation printf "$var" # backslash interpretation occurs
-eflag or not? We cannot know that without seeing some code.-eoption is forechoto parse escape code (used for example for VT100 escape codes or embedded newlines etc.). If your string doesn't have any escape code, then you don't need it.-eoption is not in the POSIX standard forecho. It's less of a "Bashism" and more of a GNUism" I would say, especially since in Linux it's not only a Bash built-in command, but also part of GNU coreutils.command echo -e .... Thecommandcommand, which is part of the POSIX standard, causes theechofrom your PATH to be executed, instead of the builtinecho.