I have a problem with printing signs \n. My script is make for bash and is set to posix=yes. When I ran program on Mac the printing to bash is done only by echo "text here". But when I ran it on Ubuntu VM, then there must be echo -e "text here because, if there's not, then the program does not work correctly.
The problem is, when I try to run script with echo -e in MacOS Bash (not zsh), it will print to terminal -e and call that the is not switcher -e for echo.
Why is it doing, please?
To enter bash in terminal on mac I used command "bash"
Try using
printfinstead ofecho.Support for
-ewithechois very shell- and platform-specific, whileprintfusually just works.(Bash's builtin command
echosupport-e, but some other shell's don't)Example: