Under some answers, I see comments that recommend avoiding shell specific commands in answers.How do I know which commands, operators, etc exist in all shells? Is there a list of standards?man builtins gives a list of commands. Are those the only commands that I can use in a portable shell scriptthat works in all shells?Can a built-in be shell specific?Do the standards for Linux differ from that of other Unixes?What about syntax? Can punctuation, operators, etc be different in some shells?
What is not shell specific?
linux;shell;command line;standard;shell builtin
Greg's Wiki has a post on adapting bash scripts for Dash that points out a lot of 'bashisms' - extra features that are non-standard but are a part of bash. Avoiding those bashisms can help to make your script friendlier to different environments. This particularly answers some of your questions. For instance, yes, there are operators that differ (like ==), but there are a standard Posix set that should work in all environments.For more thorough reading, you can check out the Posix standard, which all shells should comply to. Particularly, the volume on Shell & Utilities.What I find more challenging than the shell differences are the command differences. Many Linux systems have GNU find, but if you're writing a portable script, don't rely on your own man find, because there are lots of systems out there with BSD find, which has a different feature set. If you're writing scripts for busybox, you'll find there are different versions with entirely different ncs. Those are the kinds of things that always get me when I deploy a script to different environments.For extra reading on good shell scripting practices, there is also a good resource on David Pashley's blog: Writing Robust Bash Shell ScriptsAlso, make sure you read Gilles answers and comments on this site. He has lots of tips about making sure you use portable code.