It's less of a problem in today's Linux monoculture, but I actually initially learned Perl and Tcl precisely because of subtle incompatibilities between systems for tools like sed and awk, not to mention utilities like ps and tar.
In the past I've seen bad things happen because a script was written by someone on OSX that gets run on a Linux (GNU) based system.
Two common examples are the `sleep` and `sed` commands.
Edit: I meant to reply to the parent comment.