... you're best off learning a bit about general UNIX (or Linux) programming. There are numerous books on the subject and also a *lot* of info on the web. Mac OS X has all the tools you'll need to compile UNIX software, as others have already pointed out, but there are subtle differences in the way some of the tools works on almost every UNIX system. For example, the find tool on Linux will accept an 'iname' argument which performs a case-insensitive search, however the find on Solaris does *not* take this argument. (bummer) Another example, the ls command as in Darwing/Mac OS X by default does not accept the --color argument. You first have to compile the GNU version of ls (and make some termcap settings) before you get a colour ls in Darwin/Mac OS X.
The above examples are not directly related to programming, but give you a general idea of what I mean.
Also, I believe there are some differences in the directory structure between Mac OS X/Darwin/FreeBSD and Linux, for example. (This is based on my observation that OS X seems to store some libraries I'm used to finding in /usr/lib under a libext directory)
So anyway, back to my original thought - if you were to learn about 'generic' *nix programming, then you'll know what tools to use and what they do. Then you can go back and check the man pages on OS X/Darwin to see where the differences lie, and *then* you can go about changing scripts and altering source code.
NOTE: that's just the way I would go about doing it - everyone has their own preferred way of working, and perhaps you like doing things completely different, but I just thought I'd *try* and be helpful ;-))))
C