Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • The behaviour of echo '\0013\0003!' is unspecified by POSIX. Posixly, you'd write printf '\13\3!\n'. Commented Oct 2, 2015 at 14:36
  • Do you know of a single system that intentionally decided not to be XSI compliant? Commented Oct 2, 2015 at 14:48
  • most Linux/GNU-based Unix-like software distributions only seek (without committing to) POSIX conformance, and only follow XSI unless that would break backward compatibility (like would be for echo). Same of FreeBSD. Between themselves, that probably constitutes over 90% of the audience of this Q&A site, so they can't be ignored. Best it to give up altogether on echo. That command is beyond hope to be made portable. Commented Oct 2, 2015 at 15:16
  • I am not aware of a single Linux distro that seeks POSIX compliance. The Linux folks decided that they do neither actively collaborate in the POSIX process nor try to follow existing POSIX standards. They have been given the chance to get a POSIX certification for 1 $ and Andrew Josey (OpenGroup chair) spend a lot of time to help the Linux people with the certification and related fixes but at some time they did stop any related activity. BTW: The situation with echo is a result of the implementation in bash that is a result of the unwillingness of the FSF to follow existing standards. Commented Oct 2, 2015 at 16:47
  • There's little benefit for a Linux+other free software distribution vendor to get certified and anyway it would be hard to achieve because the software is developed by 3rd parties anyway. But there's a lot of benefit in being POSIX conformant (or at least to agree on one standard, and the opensource community has so far failed to come up with a compelling alternative to POSIX), to ease interoperability and you see most core software maintainers aiming at that. For echo (a lost cause), blaming bash is wrong since bash is conformant when in the right environment (and is certified via OS/X) Commented Oct 2, 2015 at 18:29