POSIX is a specification. Not a program. The thing that actually runs your script is bash, dash, ash, ksh, yash, or one of a dozen others. They each implement POSIX with their own gaps, extensions, and historical accidents. On bash, ksh, and a handful of others, you get back exactly what you typed: dash's echo interprets \n as a newline. bash's does not. Run it across shell-versions ...