Availability of sed and awk
Sed and awk were part of Version 7 UNIX (also known as “V7,” and “Seventh Edition”) and have been part of the standard distribution ever since. Sed has been unchanged since it was introduced.
The Free Software Foundation GNU project’s version of sed is freely available, although not technically in the public domain. Source code for GNU sed is available via anonymous FTP[1] to the host ftp.gnu.ai.mit.edu. It is in the file ftp://ftp.gnu.ai.mit.edu/pub/gnu/sed-2.05.tar.gz. This is a tar file compressed with the gzip program, whose source code is available in the same directory. There are many sites world-wide that “mirror” the files from the main GNU distribution site; if you know of one close to you, you should get the files from there. Be sure to use “binary” or “image” mode to transfer the file(s).
In 1985, the authors of awk extended the language, adding many useful features. Unfortunately, this new version remained inside AT&T for several years. It became part of UNIX System V as of Release 3.1. It can be found under the name of nawk, for new awk; the older version still exists under its original name. This is still the case on System V Release 4 systems.
On commercial UNIX systems, such as those from Hewlett-Packard, Sun, IBM, Digital, and others, the naming situation is more complicated. All of these systems have some version of both old and new awk, but what each vendor names each program varies. Some have oawk and awk, others have awk and ...