Shell scripts are great, I use and write them every day (and quite advanced ones, too). But it's very hard to make a shell script robust.
Unfortunately it's hard to find a replacement that is stable and installed everywhere. Perl is pretty close. And python too, if you are careful about making your script compatible with all the different versions.
http://www.etalabs.net/sh_tricks.html
Shell scripts are great, I use and write them every day (and quite advanced ones, too). But it's very hard to make a shell script robust.
Unfortunately it's hard to find a replacement that is stable and installed everywhere. Perl is pretty close. And python too, if you are careful about making your script compatible with all the different versions.