I am not a programmer, but I believe most of those "standard" commands (not the machine dependant kernel code, necessarily though) are written in C - you shouldn't have too hard a time making your own, or modifying an existing.
You may have luck with Solaris source, though - see this article:
http://www.techweb.com/wire/story/TWB19991001S0004
There isn't much that I could find on the Sun site about this just yet, though. Just this page:
http://wwws.sun.com/software/solaris/source/
On the other hand, you can browse the source for GNU tools by downloading the appropriate package from the
ftp://ftp.gnu.org archive. It can get tricky, though, since it's packaged. For example, the "join" command would be found in the "textutils" packages, along with other commands...
Another alternative that people forget about is the BSD project. You can browse the FreeBSD source via a CVS web interface, found here:
http://www.freebsd.org/cgi/cvsweb.cgi/src/
I believe similar method exist for Open and Net BSDs, although I haven't checked.
Hope this helps.