Are there versions of Unix that don't have awk in default install?

Awk is part of POSIX and Single Unix (and has been since they exist). It has also been a part of classical Unix for a very long time, and is installed by default on every modern full-fledged Unix.

Awk is a few years younger than Unix, so obviously there have been versions of Unix without Awk. Awk appeared in V7 and in BSD since the first full release. MINIX 2 had awk; I'm not sure if the few systems based on MINIX 1 all had it.

There are stripped-down unices today without Awk — mostly embedded systems running Linux with BusyBox. BusyBox does have an awk command, but it is optional, like almost everything in BusyBox.

As a sociological matter, if someone tells you that they have “a Unix system” or “a Linux system” (or variants thereof), you can safely assume that they have awk. You should only worry about the availability of awk if you're told that they're running an antique system or a stripped-down system.


The AWK wikipedia page states it as follows:

excerpt

As one of the early tools to appear in Version 7 Unix, it gained popularity as a way to add computational features to a Unix pipeline and besides the Bourne shell is the only scripting language available in a standard Unix environment. It is one of the mandatory utilities of the Single UNIX Specification; required by the Linux Standard Base specification — and implementations of AWK exist for almost all other operating systems.

Given this I'd say there isn't a version of UNIX that goes without including AWK.

Partial implementations?

Here's where it can get in the gray area. Applications like Busybox include a subset of awk functions so it's difficult to qualify whether it's included or not.

See what's included in Android APK for example:

  • https://code.google.com/p/yangapp/downloads/detail?name=busybox-1.20.2r2

Solaris "small server" installations do not have a POSIX-compliant Awk available.

Technically this means they are not POSIX and not UNIX, but it's certainly possible that you will want to have your script work on these systems.

For additional reading, see:

  • https://unix.stackexchange.com/a/360380/135943
  • https://www.mail-archive.com/[email protected]/msg00885.html

Tags:

Awk