On 11/02/2015 01:56 PM, Shawn McMahon wrote: > On Mon, Nov 2, 2015 at 3:52 PM, Evan Rempel <[email protected]> wrote: > >> >> The task is easy to solve in nearly any language, but I can not depend on >> awk, perl, python, tcl, java or any other interpreter to be available in >> all of the enviroments
perl, python, tcl, java, and many other interpreters are not in POSIX, so you are correct that you cannot rely on them being present on all systems. But awk IS required by POSIX, and is quite portably present in practice (although you have to use a common subset of features, as not all awks are the same). >> IMHO one of the greatest strengths of the core (or more) utils is >> that they provide this consistency and standardization when nothing else >> does. Even if awk is not part of GNU coreutils, it is commonly available. Similarly, other POSIX commands such as 'find' and even 'sh' are not part of coreutils, but you can rely on them being present. > > I think you could probably count on the presence of awk more certainly than > the presence of an up-to-date "date". Indeed - writing a solution that is portable to the functionality required by POSIX is going to be a lot more likely to work on a random system than writing a solution that requires new-enough GNU coreutils to be installed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
