diff --git a/doc/install.html b/doc/install.html
index 2256123ecb8..f2736df57da 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -81,8 +81,8 @@ To build it, you need these programs installed:
the standard C libraries,
the parser generator Bison,
GNU make (version 3.81 or later),
-awk, and
-the text editor ed.
+and
+awk.
diff --git a/src/cmd/5l/mkenam b/src/cmd/5l/mkenam
index 265cb998880..6cccb02638e 100644
--- a/src/cmd/5l/mkenam
+++ b/src/cmd/5l/mkenam
@@ -28,18 +28,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-ed - ../5l/5.out.h <<'!'
-v/^ A/d
-,s/^ A/ "/
-g/ .*$/s///
-,s/,*$/",/
-1i
-char* anames[] =
-{
-.
-$a
-};
-.
-w enam.c
-Q
-!
+awk '
+BEGIN {
+ print "char* anames[] ="
+ print "{"
+}
+
+/^ A/ {
+ name=$1
+ sub(/,/, "", name)
+ sub(/^A/, "", name)
+ print "\t\"" name "\","
+}
+
+END { print "};" }
+' ../5l/5.out.h >enam.c
diff --git a/src/cmd/6l/mkenam b/src/cmd/6l/mkenam
index 5cabb263337..3001dbe9346 100644
--- a/src/cmd/6l/mkenam
+++ b/src/cmd/6l/mkenam
@@ -28,18 +28,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-/bin/ed - ../6l/6.out.h <<'!'
-v/^ A/d
-,s/^ A/ "/
-g/ .*$/s///
-,s/,*$/",/
-1i
-char* anames[] =
-{
-.
-$a
-};
-.
-w enam.c
-Q
-!
+awk '
+BEGIN {
+ print "char* anames[] ="
+ print "{"
+}
+
+/^ A/ {
+ name=$1
+ sub(/,/, "", name)
+ sub(/^A/, "", name)
+ print "\t\"" name "\","
+}
+
+END { print "};" }
+' ../6l/6.out.h >enam.c
diff --git a/src/cmd/8l/mkenam b/src/cmd/8l/mkenam
index b33fec7cc40..992aa316073 100644
--- a/src/cmd/8l/mkenam
+++ b/src/cmd/8l/mkenam
@@ -28,18 +28,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-ed - ../8l/8.out.h <<'!'
-v/^ A/d
-,s/^ A/ "/
-g/ .*$/s///
-,s/,*$/",/
-1i
-char* anames[] =
-{
-.
-$a
-};
-.
-w enam.c
-Q
-!
+awk '
+BEGIN {
+ print "char* anames[] ="
+ print "{"
+}
+
+/^ A/ {
+ name=$1
+ sub(/,/, "", name)
+ sub(/^A/, "", name)
+ print "\t\"" name "\","
+}
+
+END { print "};" }
+' ../8l/8.out.h >enam.c
diff --git a/src/env.bash b/src/env.bash
index 19402f30608..1db0daa22b1 100644
--- a/src/env.bash
+++ b/src/env.bash
@@ -55,7 +55,6 @@ PROGS="
cp
cut
echo
- ed
egrep
gcc
grep