Question: What resources exist for portable shell programming? The ultimate answer is to test on all targeted platforms, but that's rarely practical.

The [POSIX / Single UNIX specification](http://pubs.opengroup.org/onlinepubs/009695399/) is a start, but it tells neither you what the level of support of each implementation is, nor what common extensions exist. You can read the documentation of each implementation, but that's very time consuming and not completely accurate.

I seems to me that an ideal format would be some kind of community-annotated version of the POSIX spec, where each feature is annotated by its support level amongst the different implementations. Is there such a thing? Or are there other useful resources?

For example, there is [Sven Mascheck's shell portability pages](http://www.in-ulm.de/~mascheck/various/), but it's only about syntactic elements and a few built-ins, and only covers old shells. I'm looking for a more comprehensive resource.

Answer: 
The autoconf manual has a section on
[portable shell programming](http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html).

Although that's not specifically targeting POSIX, it's probably the
most complete collection of what to do and not to do when attempting
to write portable shell code.
Similar to [this answer](https://unix.stackexchange.com/questions/9997/resources-for-portable-shell-programming/10002#10002), try executing your script in [posh](http://packages.debian.org/unstable/posh).

Also, don't forget to set the `POSIXLY_CORRECT` environment variable to true, as this causes many programs (not only the shell) to adhere more strictly to the POSIX standards.