3 ms·
Unless you have an encyclopedic memory and copious leisure time, you'd probably be much better off writing perl scripts instead if you care about portability. T
by patrec 6y ago
Unless you have an encyclopedic memory and copious leisure time, you'd probably be much better off writing perl scripts instead if you care about portability. There is an enormous amount of sometimes subtle divergence between behaviors of core tools you need for shell scripting (sed, tr, mktemp, readlink all behave very differently between different versions of unix,for example) and even if you manage to memorize exactly what's in posix (and accept the fairly severe limitiations in expressiveness this entails), few things are actually 100% posix conforming.
- arendtio 6y agoAFAIK, mktemp is not part of POSIX. I use the POSIX documentation as my primary source of documentation when writing scripts. Most of the time, I have seen that the differences between the implementations are in the additions but not in the core functionalities that are described by POSIX. A nice entry to the POSIX documentation is being provided by this website: https://shellhaters.org https://shellhaters.org