Bell 32V development
authorTom London <tbl@research.uucp>
Thu, 25 Jan 1979 12:39:46 +0000 (07:39 -0500)
committerTom London <tbl@research.uucp>
Thu, 25 Jan 1979 12:39:46 +0000 (07:39 -0500)
Work on file usr/lib/learn/editor/L72.2a
Work on file usr/lib/learn/editor/L72.1a
Work on file usr/lib/learn/editor/L71.1a
Work on file usr/lib/learn/editor/L73.1a
Work on file usr/lib/learn/editor/L72.2b
Work on file usr/lib/learn/editor/L74.1a
Work on file usr/lib/learn/editor/L8.1a
Work on file usr/lib/learn/editor/L72.2d
Work on file usr/lib/learn/editor/L72.2c
Work on file usr/lib/learn/editor/L9.2a
Work on file usr/lib/learn/editor/L8.2b
Work on file usr/lib/learn/editor/L8.1b
Work on file usr/lib/learn/editor/L8.2a
Work on file usr/lib/learn/editor/L9.2b
Work on file usr/lib/learn/editor/L9.2d
Work on file usr/lib/learn/editor/L8.2c
Work on file usr/lib/learn/editor/L9.1a
Work on file usr/lib/learn/editor/L9.3c
Work on file usr/lib/learn/editor/L9.2e
Work on file usr/lib/learn/morefiles/L0.1b
Work on file usr/lib/learn/morefiles/L0.1d
Work on file usr/lib/learn/morefiles/L0.1f
Work on file usr/lib/learn/morefiles/L0.1c
Work on file usr/lib/learn/morefiles/L0.1g
Work on file usr/lib/learn/morefiles/L0.1a
Work on file usr/lib/learn/morefiles/L0.1e
Work on file usr/lib/learn/morefiles/L0
Work on file usr/lib/learn/morefiles/L1.1a
Work on file usr/lib/learn/morefiles/L1.1d
Work on file usr/lib/learn/morefiles/L1.1c
Work on file usr/lib/learn/morefiles/L2.1c
Work on file usr/lib/learn/morefiles/L2.1b
Work on file usr/lib/learn/morefiles/L2.1a
Work on file usr/lib/learn/morefiles/L1.1b
Work on file usr/lib/learn/morefiles/L2.1f
Work on file usr/lib/learn/morefiles/L3.1b
Work on file usr/lib/learn/morefiles/L2.1d
Work on file usr/lib/learn/morefiles/L3.1a
Work on file usr/lib/learn/morefiles/L2.1e
Work on file usr/lib/learn/morefiles/L3.1c
Work on file usr/lib/learn/morefiles/L3.2a
Work on file usr/lib/learn/morefiles/L3.1f
Work on file usr/lib/learn/morefiles/L3.1d
Work on file usr/lib/learn/morefiles/L3.1e
Work on file usr/lib/learn/morefiles/L4.1a
Work on file usr/lib/learn/morefiles/L4.1c
Work on file usr/lib/learn/morefiles/L4.1b
Work on file usr/lib/learn/morefiles/L4.1g
Work on file usr/lib/learn/morefiles/L4.1e
Work on file usr/lib/learn/morefiles/L4.2a
Work on file usr/lib/learn/morefiles/L4.1f
Work on file usr/lib/learn/morefiles/L4.1d
Work on file usr/lib/learn/morefiles/L5.1a
Work on file usr/lib/learn/morefiles/L5.1c
Work on file usr/lib/learn/morefiles/L5.1d
Work on file usr/lib/learn/morefiles/L6.1a
Work on file usr/lib/learn/morefiles/L5.1b
Work on file usr/lib/learn/morefiles/L5.1e
Work on file usr/lib/learn/morefiles/L6.2e
Work on file usr/lib/learn/morefiles/L6.1e
Work on file usr/lib/learn/morefiles/L6.1b
Work on file usr/lib/learn/morefiles/L6.1d
Work on file usr/lib/learn/morefiles/L6.1c
Work on file usr/lib/learn/morefiles/L7.1a
Work on file usr/lib/learn/macros/L0
Work on file usr/lib/learn/macros/L10.1a
Work on file usr/lib/learn/macros/L12.1a
Work on file usr/lib/learn/macros/L1.1a
Work on file usr/lib/learn/macros/L11.1a
Work on file usr/lib/learn/macros/L13.1a
Work on file usr/lib/learn/macros/L14.1a
Work on file usr/lib/learn/macros/L4.1a
Work on file usr/lib/learn/macros/L15.1a
Work on file usr/lib/learn/macros/L3.1a
Work on file usr/lib/learn/macros/L2.1a
Work on file usr/lib/learn/macros/L6.1a
Work on file usr/lib/learn/macros/L5.1a
Work on file usr/lib/learn/macros/L7.1a
Work on file usr/lib/learn/macros/L9.1a
Work on file usr/lib/learn/macros/L8.1a
Work on file usr/lib/learn/eqn/L1.1f
Work on file usr/lib/learn/eqn/L1.1c
Work on file usr/lib/learn/eqn/L1.1a
Work on file usr/lib/learn/eqn/L1.1b
Work on file usr/lib/learn/eqn/L0.1a
Work on file usr/lib/learn/eqn/L1.1d
Work on file usr/lib/learn/eqn/L10.1a
Work on file usr/lib/learn/eqn/L0
Work on file usr/lib/learn/eqn/Init
Work on file usr/lib/learn/eqn/L1.1e
Work on file usr/lib/learn/eqn/L10.2c
Work on file usr/lib/learn/eqn/L11.1a
Work on file usr/lib/learn/eqn/L11.1d
Work on file usr/lib/learn/eqn/L10.1c
Work on file usr/lib/learn/eqn/L10.1b
Work on file usr/lib/learn/eqn/L11.1b
Work on file usr/lib/learn/eqn/L11.1c

Co-Authored-By: John Reiser <jfr@research.uucp>
Synthesized-from: 32v

97 files changed:
usr/lib/learn/editor/L71.1a [new file with mode: 0644]
usr/lib/learn/editor/L72.1a [new file with mode: 0644]
usr/lib/learn/editor/L72.2a [new file with mode: 0644]
usr/lib/learn/editor/L72.2b [new file with mode: 0644]
usr/lib/learn/editor/L72.2c [new file with mode: 0644]
usr/lib/learn/editor/L72.2d [new file with mode: 0644]
usr/lib/learn/editor/L73.1a [new file with mode: 0644]
usr/lib/learn/editor/L74.1a [new file with mode: 0644]
usr/lib/learn/editor/L8.1a [new file with mode: 0644]
usr/lib/learn/editor/L8.1b [new file with mode: 0644]
usr/lib/learn/editor/L8.2a [new file with mode: 0644]
usr/lib/learn/editor/L8.2b [new file with mode: 0644]
usr/lib/learn/editor/L8.2c [new file with mode: 0644]
usr/lib/learn/editor/L9.1a [new file with mode: 0644]
usr/lib/learn/editor/L9.2a [new file with mode: 0644]
usr/lib/learn/editor/L9.2b [new file with mode: 0644]
usr/lib/learn/editor/L9.2d [new file with mode: 0644]
usr/lib/learn/editor/L9.2e [new file with mode: 0644]
usr/lib/learn/editor/L9.3c [new file with mode: 0644]
usr/lib/learn/eqn/Init [new file with mode: 0755]
usr/lib/learn/eqn/L0 [new file with mode: 0644]
usr/lib/learn/eqn/L0.1a [new file with mode: 0644]
usr/lib/learn/eqn/L1.1a [new file with mode: 0644]
usr/lib/learn/eqn/L1.1b [new file with mode: 0644]
usr/lib/learn/eqn/L1.1c [new file with mode: 0644]
usr/lib/learn/eqn/L1.1d [new file with mode: 0644]
usr/lib/learn/eqn/L1.1e [new file with mode: 0644]
usr/lib/learn/eqn/L1.1f [new file with mode: 0644]
usr/lib/learn/eqn/L10.1a [new file with mode: 0644]
usr/lib/learn/eqn/L10.1b [new file with mode: 0644]
usr/lib/learn/eqn/L10.1c [new file with mode: 0644]
usr/lib/learn/eqn/L10.2c [new file with mode: 0644]
usr/lib/learn/eqn/L11.1a [new file with mode: 0644]
usr/lib/learn/eqn/L11.1b [new file with mode: 0644]
usr/lib/learn/eqn/L11.1c [new file with mode: 0644]
usr/lib/learn/eqn/L11.1d [new file with mode: 0644]
usr/lib/learn/macros/L0 [new file with mode: 0644]
usr/lib/learn/macros/L1.1a [new file with mode: 0644]
usr/lib/learn/macros/L10.1a [new file with mode: 0644]
usr/lib/learn/macros/L11.1a [new file with mode: 0644]
usr/lib/learn/macros/L12.1a [new file with mode: 0644]
usr/lib/learn/macros/L13.1a [new file with mode: 0644]
usr/lib/learn/macros/L14.1a [new file with mode: 0644]
usr/lib/learn/macros/L15.1a [new file with mode: 0644]
usr/lib/learn/macros/L2.1a [new file with mode: 0644]
usr/lib/learn/macros/L3.1a [new file with mode: 0644]
usr/lib/learn/macros/L4.1a [new file with mode: 0644]
usr/lib/learn/macros/L5.1a [new file with mode: 0644]
usr/lib/learn/macros/L6.1a [new file with mode: 0644]
usr/lib/learn/macros/L7.1a [new file with mode: 0644]
usr/lib/learn/macros/L8.1a [new file with mode: 0644]
usr/lib/learn/macros/L9.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L0 [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1f [new file with mode: 0644]
usr/lib/learn/morefiles/L0.1g [new file with mode: 0644]
usr/lib/learn/morefiles/L1.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L1.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L1.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L1.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L2.1f [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L3.1f [new file with mode: 0644]
usr/lib/learn/morefiles/L3.2a [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1f [new file with mode: 0644]
usr/lib/learn/morefiles/L4.1g [new file with mode: 0644]
usr/lib/learn/morefiles/L4.2a [new file with mode: 0644]
usr/lib/learn/morefiles/L5.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L5.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L5.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L5.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L5.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L6.1a [new file with mode: 0644]
usr/lib/learn/morefiles/L6.1b [new file with mode: 0644]
usr/lib/learn/morefiles/L6.1c [new file with mode: 0644]
usr/lib/learn/morefiles/L6.1d [new file with mode: 0644]
usr/lib/learn/morefiles/L6.1e [new file with mode: 0644]
usr/lib/learn/morefiles/L6.2e [new file with mode: 0644]
usr/lib/learn/morefiles/L7.1a [new file with mode: 0644]

diff --git a/usr/lib/learn/editor/L71.1a b/usr/lib/learn/editor/L71.1a
new file mode 100644 (file)
index 0000000..1f665f3
--- /dev/null
@@ -0,0 +1,108 @@
+#print
+After the global command has selected the lines
+to which the second command is to be applied, it sets '.' (the
+current line) to each of these lines in turn as it executes
+the controlled command.  Thus you can reference the line
+before or after the selected line.  For example,
+  g/xx/.-1s/ab/cd/
+changes 'ab' to 'cd' on the line BEFORE each line with xx.
+And
+  g/xx/$t.+1
+inserts a copy of the last line in the file two lines
+after each line with 'xx' on it.
+In this directory, the file 'memo' has paragraphs indicated
+by lines beginning ".PP".  Add two blanks to the beginning of
+the line after each ".PP", and then delete the ".PP" lines.
+This should take only two commands.  Rewrite the file and then
+type "ready".
+#create Ref
+The Ascent of the Riffelberg
+by Mark Twain
+
+  I sat silent some time, then turned to Harris and said:
+``My mind is made up.''
+Something in my tone struck him; and when he glanced
+at my eye and read what was written there, his face paled
+perceptibly.  He hesitated a moment, then said:
+``Speak.''
+  I answered, with perfect calmness:
+``I WILL ASCEND THE RIFFELBERG.''
+  If I had shot my poor friend he could not have fallen from
+his chair more suddenly.  If I had been his father he
+could not have pleaded harder to get me to give up my
+purpose.  But I turned a deaf ear to all he said.  When he
+perceived at last that nothing could alter my determination,
+he ceased to urge, and for a while the deep silence was broken only
+by his sobs.  I sat in marble resolution, with my
+eyes fixed upon vacancy, for in spirit I was already
+wrestling with the perils of the mountains, and my friend sat
+gazing at me in adoring admiration through his tears.  At
+last he threw himself upon me in a loving embrace and
+exclaimed in broken tones:
+``Your Harris will never desert you.  We will die together!''
+  I cheered the noble fellow with praises, and soon his fears
+were forgotten and he was eager for the adventure.  He
+wanted to summon the guides at once and leave at two in
+the morning, as he supposed the custom was; but I explained that nobody
+was looking at that hour; and that the start in the dark
+was not usually made from the village but
+from the first night's resting-place on the mountainside.  I
+said we would leave the village at 3 or 4 p.m. on the morrow;
+meantime he could notify the guides, and also let the public
+know of the attempt which we proposed to make.
+  I went to bed, but not to sleep.  No man can sleep when
+he is about to undertake one of these Alpine exploits.  I
+tossed feverishly all night long, and was glad enough when
+I heard the clock strike half past eleven and knew it was
+time to get up for dinner.
+#create memo
+The Ascent of the Riffelberg
+by Mark Twain
+
+.PP
+I sat silent some time, then turned to Harris and said:
+``My mind is made up.''
+Something in my tone struck him; and when he glanced
+at my eye and read what was written there, his face paled
+perceptibly.  He hesitated a moment, then said:
+``Speak.''
+.PP
+I answered, with perfect calmness:
+``I WILL ASCEND THE RIFFELBERG.''
+.PP
+If I had shot my poor friend he could not have fallen from
+his chair more suddenly.  If I had been his father he
+could not have pleaded harder to get me to give up my
+purpose.  But I turned a deaf ear to all he said.  When he
+perceived at last that nothing could alter my determination,
+he ceased to urge, and for a while the deep silence was broken only
+by his sobs.  I sat in marble resolution, with my
+eyes fixed upon vacancy, for in spirit I was already
+wrestling with the perils of the mountains, and my friend sat
+gazing at me in adoring admiration through his tears.  At
+last he threw himself upon me in a loving embrace and
+exclaimed in broken tones:
+``Your Harris will never desert you.  We will die together!''
+.PP
+I cheered the noble fellow with praises, and soon his fears
+were forgotten and he was eager for the adventure.  He
+wanted to summon the guides at once and leave at two in
+the morning, as he supposed the custom was; but I explained that nobody
+was looking at that hour; and that the start in the dark
+was not usually made from the village but
+from the first night's resting-place on the mountainside.  I
+said we would leave the village at 3 or 4 p.m. on the morrow;
+meantime he could notify the guides, and also let the public
+know of the attempt which we proposed to make.
+.PP
+I went to bed, but not to sleep.  No man can sleep when
+he is about to undertake one of these Alpine exploits.  I
+tossed feverishly all night long, and was glad enough when
+I heard the clock strike half past eleven and knew it was
+time to get up for dinner.
+#user
+#cmp memo Ref
+#log
+#next
+72.1a 10
+72.2a 5
diff --git a/usr/lib/learn/editor/L72.1a b/usr/lib/learn/editor/L72.1a
new file mode 100644 (file)
index 0000000..c1fb039
--- /dev/null
@@ -0,0 +1,48 @@
+#print
+A command related to the global command is the 'v' command.
+It also selects lines on which a second command is executed; the
+difference between 'g' and 'v' is that the selected lines
+for the 'v' command are all those on which the expression
+is NOT found.  Thus
+  v/abc/s/x/y/g
+changes 'x' to 'y' on all lines NOT containing an 'abc'.
+There is a file 'price' in this directory.  Find all lines
+that do NOT begin with blank and prefix three asterisks
+to them.  Then rewrite the file and type "ready".
+#create Ref
+***beef
+  shoulder 1.39/lb
+  flank    1.59/lb
+  sirloin  2.19/lb
+  round    1.89/lb
+***fish
+  sword    3.99/lb
+  cod      1.99/lb
+  blues    2.49/lb
+  stripers 3.49/lb
+  flounder 2.99/lb
+***pork
+  shoulder  .89/lb
+  loin     1.59/lb
+  bacon    1.19/lb
+#create price
+beef
+  shoulder 1.39/lb
+  flank    1.59/lb
+  sirloin  2.19/lb
+  round    1.89/lb
+fish
+  sword    3.99/lb
+  cod      1.99/lb
+  blues    2.49/lb
+  stripers 3.49/lb
+  flounder 2.99/lb
+pork
+  shoulder  .89/lb
+  loin     1.59/lb
+  bacon    1.19/lb
+#user
+#cmp price Ref
+#log
+#next
+73.1a 10
diff --git a/usr/lib/learn/editor/L72.2a b/usr/lib/learn/editor/L72.2a
new file mode 100644 (file)
index 0000000..d286e31
--- /dev/null
@@ -0,0 +1,33 @@
+#print
+A command related to the 'g' command is the 'v' command.  The
+'v' command also selects lines on which another command is to
+be executed;  the difference between 'g' and 'v' is that
+the 'v' command selects all lines on which the specified
+expression is NOT found.  Thus 
+  v/ly$/p
+prints all lines which do NOT end in "ly".
+Or
+ v/e/p
+prints all lines WITHOUT an 'e'in them.
+Are there any lines in file "story"
+without an 'i'?  Find out using the editor; then
+leave the editor and type "yes" or "no".
+#create story
+   Credit "rationing," already being imposed by major banks in
+big cities, may soon spread to banks large and small in every corner
+of the United States.  Result:  Speculative loans may become hard
+to get anywhere.
+   Working in near-secrecy, a committee of the powerful American
+Bankers Association is drafting an unprecedented policy statement
+aimed at getting bankers across the country to be far choosier in
+making business loans.  The ABA it is believed, is being driven to
+this move partly by a nagging fear that the Federal Government will
+impose lending guidelines if banks fail to tighten up voluntarily.
+   The ABA's task is delicate.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+72.2b 10
diff --git a/usr/lib/learn/editor/L72.2b b/usr/lib/learn/editor/L72.2b
new file mode 100644 (file)
index 0000000..b6a9d19
--- /dev/null
@@ -0,0 +1,54 @@
+#print
+Edit the file "cities" to remove all lines NOT
+containing "NJ".  Then rewrite the file
+and type "ready".
+#create Ref
+Camden NJ 08101
+Elizabeth NJ 07207
+Jersey City NJ 07303
+Newark NJ 07101
+Paterson NJ 07510
+Trenton NJ 08608
+#create cities
+Albany NY 12201
+Atlanta GA 30301
+Baltimore MD 21233
+Boston MA 02109
+Bridgeport CN 06601
+Buffalo NY 14240
+Camden NJ 08101
+Chicago IL 60607
+Dallas TX 75221
+Denver CO 80201
+Detroit MI 48226
+Elizabeth NJ 07207
+Hartford CN 06101
+Houston TX 77052
+Indianapolis IN 46204
+Jersey City NJ 07303
+Los Angeles CA 90053
+Miami FL 33101
+Milwaukee WI 53201
+Minneapolis MN 55401
+New York NY 10001
+Newark NJ 07101
+Paterson NJ 07510
+Philadelphia PA 19104
+Phoenix AR 85026
+Pittsburgh PA 15230
+Providence RI 02904
+Rochester NY 14603
+San Diego CA 92101
+San Francisco CA 94101
+Seattle WA 98101
+St. Louis MO 63166
+Syracuse NY 13201
+Trenton NJ 08608
+Utica NY 13503
+Washington DC 20013
+Yonkers NY 10598
+#user
+#cmp cities Ref
+#log
+#next
+72.2c 10
diff --git a/usr/lib/learn/editor/L72.2c b/usr/lib/learn/editor/L72.2c
new file mode 100644 (file)
index 0000000..4218185
--- /dev/null
@@ -0,0 +1,42 @@
+#print
+There is a file "price" in this directory.  Find all
+lines which don't begin with blank and put three asterisks
+at the beginning of each such line.  Then rewrite
+the file and type "ready".
+#create Ref
+***beef
+  shoulder 1.39/lb
+  flank    1.59/lb
+  sirloin  2.19/lb
+  round    1.89/lb
+***fish
+  sword    3.99/lb
+  cod      1.99/lb
+  blues    2.49/lb
+  stripers 3.49/lb
+  flounder 2.99/lb
+***pork
+  shoulder  .89/lb
+  loin     1.59/lb
+  bacon    1.19/lb
+#create price
+beef
+  shoulder 1.39/lb
+  flank    1.59/lb
+  sirloin  2.19/lb
+  round    1.89/lb
+fish
+  sword    3.99/lb
+  cod      1.99/lb
+  blues    2.49/lb
+  stripers 3.49/lb
+  flounder 2.99/lb
+pork
+  shoulder  .89/lb
+  loin     1.59/lb
+  bacon    1.19/lb
+#user
+#cmp price Ref
+#log
+#next
+72.2d 10
diff --git a/usr/lib/learn/editor/L72.2d b/usr/lib/learn/editor/L72.2d
new file mode 100644 (file)
index 0000000..6f6fd89
--- /dev/null
@@ -0,0 +1,27 @@
+#print
+There is a file "song" in this directory. Find all lines
+which don't end in "." and put a comma at the end of
+these lines.  Then rewrite the file and type "ready".
+#create Ref
+It seems that Early English art,
+ Alone retains its zest.
+To charm and please its devotees,
+ We've done our level best.
+We're not quite sure that all we do,
+ Has the Early English ring,
+But as far as we can tell,
+ It's something lIke this sort of thing.
+#create song
+It seems that Early English art
+ Alone retains its zest.
+To charm and please its devotees
+ We've done our level best.
+We're not quite sure that all we do
+ Has the Early English ring
+But as far as we can tell
+ It's something lIke this sort of thing.
+#user
+#cmp song Ref
+#log
+#next
+73.1a 10
diff --git a/usr/lib/learn/editor/L73.1a b/usr/lib/learn/editor/L73.1a
new file mode 100644 (file)
index 0000000..158d0d9
--- /dev/null
@@ -0,0 +1,34 @@
+#print
+Back early in this sequence we made clear that
+the shell (the normal command interpreter) and the
+editor were distinct and they didn't pay any attention
+to each other's commands.
+Sometimes you are in the editor and you really want
+to execute a shell command.  You can do that
+by prefixing it with !.  For example,
+  !ls
+will list your directory.
+Remember that "date" is the shell command
+to find out what time it is.
+Try editing the file 'bridge'; print it out,
+then, without leaving the editor, ask for the
+time and then leave the editor and say "ready".
+#create bridge
+brooklyn
+manhattan
+williamsburg
+queensborough
+george washington
+triborough
+bronx whitestone
+throgs neck
+#create X2
+!date
+#copyin
+#user
+#uncopyin
+grep date .copy | tail -1 >X1
+#cmp X1 X2
+#log
+#next
+74.1a 10
diff --git a/usr/lib/learn/editor/L74.1a b/usr/lib/learn/editor/L74.1a
new file mode 100644 (file)
index 0000000..08be154
--- /dev/null
@@ -0,0 +1,80 @@
+#print
+Here's a last review exercise.  In the file "cities" is a list
+of cities with populations and Zip codes.  The following cities
+were omitted: add them in alphabetical order
+  St. Louis  622,236  MO 63166
+  Columbus 539,677 OH 43216
+Then, edit the file so that
+ (a) the blanks, if any, at the beginnings of lines and
+ends of lines are removed.
+ (b) each interior string of blanks is replaced by a single tab,
+except for the blanks within "Los Angeles", "New Orleans",
+"New York", "San Antonio", "San Diego", "San Francisco",
+and "St. Louis".
+ (c) Spell "Washington" and "Indianapolis" correctly.
+Then rewrite the file and type "ready".
+#create Ref
+Atlanta        496,973 GA      30301
+Baltimore      905,759 MD      21233
+Boston 641,071 MA      02109
+Bridgeport     156,542 CN      06601
+Buffalo        462,768 NY      14240
+Chicago        3,366,957       IL      60607
+Cleveland      750,903 OH      44101
+Columbus       539,677 OH      43216
+Dallas 844,401 TX      75221
+Denver 514,678 CO      80201
+Detroit        1,511,482       MI      48226
+Hartford       158,017 CN      06101
+Houston        1,232,802       TX      77052
+Indianapolis   774,624 IN      46201
+Los Angeles    2,809,596       CA      92101
+Miami  334,859 FL      33101
+Milwaukee      717,099 WI      53201
+Minneapolis    434,400 MN      55401
+New Orleans    593,471 LA      70140
+New York       7,894,862       NY      10001
+Newark 382,417 NJ      07901
+Omaha  347,328 NE      68108
+Philadephia    1,948,609       PA      19104
+Phoenix        581,562 AR      85026
+Pittsburgh     520,117 PA      15230
+San Antonio    654,153 TX      78205
+San Diego      696,769 CA      92101
+San Francisco  715,674 CA      94101
+Seattle        530,831 WA      98101
+St. Louis      622,236 MO      63166
+Washington     756,510 DC      20013
+#create cities
+  Atlanta  496,973  GA     30301
+  Baltimore  905,759  MD  21233
+Boston  641,071  MA  02109 
+Bridgeport  156,542   CN  06601
+  Buffalo  462,768  NY  14240
+  Chicago     3,366,957  IL  60607
+Cleveland  750,903  OH  44101 
+Dallas  844,401  TX  75221
+Denver  514,678  CO  80201
+Detroit  1,511,482   MI  48226
+Hartford  158,017  CN  06101 
+Houston  1,232,802   TX  77052
+Indianpolis  774,624  IN  46201
+Los Angeles  2,809,596  CA  92101 
+Miami     334,859  FL  33101 
+  Milwaukee  717,099  WI  53201
+Minneapolis  434,400  MN  55401
+New Orleans  593,471  LA  70140
+New York  7,894,862   NY  10001 
+Newark     382,417  NJ  07901
+  Omaha     347,328  NE  68108 
+  Philadephia  1,948,609  PA  19104 
+Phoenix  581,562   AR  85026
+Pittsburgh  520,117  PA  15230
+  San Antonio  654,153  TX  78205
+  San Diego  696,769  CA  92101 
+  San Francisco  715,674  CA  94101 
+  Seattle  530,831  WA  98101 
+Washinggton  756,510  DC  20013 
+#user
+#cmp cities Ref
+#log
diff --git a/usr/lib/learn/editor/L8.1a b/usr/lib/learn/editor/L8.1a
new file mode 100644 (file)
index 0000000..ee421a4
--- /dev/null
@@ -0,0 +1,38 @@
+#print
+To move around, you can use simple arithmetic
+when specifying what to print.  For example,
+  3+1p
+is the same as
+  4p
+as an editor command.  Now that's not very interesting;
+but if the '.' current line pointer is line 3,
+then using
+  .+1p
+instead of 4p is helpful.
+For example, print the 3rd and 4th
+lines of the familiar file using first "3p" to
+get to line 3 and then ".+1p" to print the next line.
+End as usual with w, q, and ready.
+#create Ref
+thomas jefferson
+james madison
+91
+#create file
+george washington
+john adams
+thomas jefferson
+james madison
+james monroe
+john quincy adams
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -3 .ocopy >X1
+#cmp Ref X1
+#log
+#next
+9.1a 10
+8.1b 7
diff --git a/usr/lib/learn/editor/L8.1b b/usr/lib/learn/editor/L8.1b
new file mode 100644 (file)
index 0000000..852bc4f
--- /dev/null
@@ -0,0 +1,18 @@
+#print
+You can also use "-" in addresses.  For example,
+the line before the current line is line ".-1"
+and can be printed with ".-1p" or even just ".-1".
+How would you print the line two lines before the current
+line?  Type "answer COMMAND" where COMMAND is
+the command you would type to print that line.
+#copyin
+#user
+#uncopyin
+#match .-2p
+#match .-2
+#match -2
+#match --
+#log
+#next
+9.1a 10
+9.2a 5
diff --git a/usr/lib/learn/editor/L8.2a b/usr/lib/learn/editor/L8.2a
new file mode 100644 (file)
index 0000000..631b6f6
--- /dev/null
@@ -0,0 +1,44 @@
+#print
+You can give addresses involving simple arithmetic
+to move around in the file.  For example, 
+  3+1p
+is the same as
+  4p
+in the editor.  Now that's not interesting, but
+if the current line (".") is line 3, then
+  .+1p
+is also 4p; it prints the next line. For example,
+you can print the 3rd and 4th lines of this file
+using
+   3p
+   .+1p
+   w
+   q
+where "3p" prints the third line, as usual,
+and then ".+1p" prints the next or fourth line.
+Try that.  Type "ready" when done.
+#create Ref
+caslon
+century schoolbook
+86
+#create file
+baskerville
+bodoni
+caslon
+century schoolbook
+futura
+helvetica
+news gothic
+times roman
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -3 .ocopy >X1
+#cmp Ref X1
+#log
+#next
+8.2b 5
+9.1a 10
diff --git a/usr/lib/learn/editor/L8.2b b/usr/lib/learn/editor/L8.2b
new file mode 100644 (file)
index 0000000..f7aeef5
--- /dev/null
@@ -0,0 +1,26 @@
+#print
+Using the same scheme, print lines 2 and 3 of this file.
+Then rewrite it and leave and type "ready".
+#create Ref
+john adams
+thomas jefferson
+91
+#create file
+george washington
+john adams
+thomas jefferson
+james madison
+james monroe
+john quincy adams
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -3 .ocopy >X1
+#cmp Ref X1
+#log
+#next
+8.2c 3
+8.1b 8
diff --git a/usr/lib/learn/editor/L8.2c b/usr/lib/learn/editor/L8.2c
new file mode 100644 (file)
index 0000000..bd33aac
--- /dev/null
@@ -0,0 +1,36 @@
+#print
+You can also use "-" in addresses.
+For example, you can print the
+line before the current line with
+  .-1p
+as a command.  Again, I'll put
+you in the editor; print the fifth
+line and then the fourth, using this
+command to print lines in reverse
+order.  Then leave with w, q, and ready.
+#create Ref
+carrots
+squash
+83
+#create file
+broccoli
+mushrooms
+cauliflower
+squash
+carrots
+lettuce
+string beans
+peas
+lima beans
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -3 .ocopy >X1
+#cmp Ref X1
+#log
+#next
+9.1a 10
+9.2a 5
diff --git a/usr/lib/learn/editor/L9.1a b/usr/lib/learn/editor/L9.1a
new file mode 100644 (file)
index 0000000..7d5a1e7
--- /dev/null
@@ -0,0 +1,34 @@
+#print
+Printing only one line at a time gets pretty
+slow.  You can print several lines with
+commands like
+  1,3p
+which prints lines 1, 2 and 3.
+Again, I'll put you into the editor
+with the familiar file.  Print lines
+2 through 5 of it; then type w, q and ready.
+#create Ref
+john adams
+thomas jefferson
+james madison
+james monroe
+91
+#create file
+george washington
+john adams
+thomas jefferson
+james madison
+james monroe
+john quincy adams
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -5 .ocopy >X1
+#cmp X1 Ref
+#log
+#next
+10.1a 10
+9.2e 5
diff --git a/usr/lib/learn/editor/L9.2a b/usr/lib/learn/editor/L9.2a
new file mode 100644 (file)
index 0000000..2ccb8da
--- /dev/null
@@ -0,0 +1,36 @@
+#print
+You can print several lines at once by
+using commands like
+  1,3p
+which prints lines 1, 2 and 3.  Again,
+I'll put you into the editor.  Print
+lines 1 to 3 of the file;  then type
+w, q and ready.
+Your commands should look like
+  1,3p
+  w
+  q
+  ready
+#create Ref
+george washington
+john adams
+thomas jefferson
+91
+#create file
+george washington
+john adams
+thomas jefferson
+james madison
+james monroe
+john quincy adams
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -4 .ocopy >X1
+#cmp X1 Ref
+#log
+#next
+9.2b 5
diff --git a/usr/lib/learn/editor/L9.2b b/usr/lib/learn/editor/L9.2b
new file mode 100644 (file)
index 0000000..3f9aca8
--- /dev/null
@@ -0,0 +1,34 @@
+#print
+You can of course use any kind of line
+numbers for the addresses in the
+"p" command.  Just as you did before,
+print lines 2 through 5 of this file,
+and then type w, q, and ready.
+#create Ref
+mushrooms
+cauliflower
+squash
+carrots
+83
+#create file
+broccoli
+mushrooms
+cauliflower
+squash
+carrots
+lettuce
+string beans
+peas
+lima beans
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+tail -5 .ocopy >X1
+#cmp X1 Ref
+#log
+#next
+9.3c 3
+9.2d 7
diff --git a/usr/lib/learn/editor/L9.2d b/usr/lib/learn/editor/L9.2d
new file mode 100644 (file)
index 0000000..ed4e408
--- /dev/null
@@ -0,0 +1,36 @@
+#print
+The "." operator can be used with multiple
+addresses to refer to the current line
+in either the first or second position (or both).
+For example, you could print from the current line
+to the 6th line with
+  .,6p
+and similarly for any other line.  I'll put
+you in the editor again, with the current line
+set in the middle of a short file; print from
+the current line position to the fifth line, and
+then type w, q and ready.
+#create Ref
+ 2. UNIX
+  3. hardware
+  4. software
+  5. manuals
+97
+#create file
+ 2. UNIX
+  3. hardware
+  4. software
+  5. manuals
+you shouldn't have printed this line.
+#copyout
+#pipe
+ed file
+1t1
+#user
+#unpipe
+#uncopyout
+tail -5 .ocopy >X1
+#cmp X1 Ref
+#log
+#next
+9.2e 5
diff --git a/usr/lib/learn/editor/L9.2e b/usr/lib/learn/editor/L9.2e
new file mode 100644 (file)
index 0000000..15ac77a
--- /dev/null
@@ -0,0 +1,21 @@
+#print
+You can also employ addresses using arithmetic with
+this kind of command.  For example, what "p" command
+would you type to print from line 2 to the line
+before the current line of the file?  Remember what
+the line before the current line is: 
+  .-1
+right?
+Type "answer COMMAND" where COMMAND is the specified
+"p" command.
+#copyin
+#user
+#uncopyin
+#match 2,.-1p
+#match 2,-p
+#match 2,.-p
+#log
+#next
+10.1a 10
+10.2a 5
+10.3a 2
diff --git a/usr/lib/learn/editor/L9.3c b/usr/lib/learn/editor/L9.3c
new file mode 100644 (file)
index 0000000..859ccb0
--- /dev/null
@@ -0,0 +1,44 @@
+#print
+You can make up addresses for the 'p' command
+using '.' for the current line when there are
+two addresses, also.  For example, you could
+print from the first line up to the present
+line with
+  1,.p
+and I suggest you try that now.  After
+that command, type the usual
+  w
+  q
+  ready
+#create Ref
+83
+broccoli
+mushrooms
+cauliflower
+squash
+carrots
+lettuce
+string beans
+peas
+lima beans
+83
+#create file
+broccoli
+mushrooms
+cauliflower
+squash
+carrots
+lettuce
+string beans
+peas
+lima beans
+#copyout
+#pipe
+ed file
+#user
+#unpipe
+#uncopyout
+#cmp .ocopy Ref
+#log
+#next
+9.2d 5
diff --git a/usr/lib/learn/eqn/Init b/usr/lib/learn/eqn/Init
new file mode 100755 (executable)
index 0000000..6d29206
--- /dev/null
@@ -0,0 +1,14 @@
+if test x$term != x
+then
+       true
+       exit
+fi
+echo 'I need to know what kind of terminal you are using.
+I will put you out of learn. Type these commands
+
+term=xxx       (where xxx is one of 300, 300S, 450, etc.)
+               (with no spaces!)
+export term
+
+Then type "learn eqn" again.'
+false
diff --git a/usr/lib/learn/eqn/L0 b/usr/lib/learn/eqn/L0
new file mode 100644 (file)
index 0000000..4da0083
--- /dev/null
@@ -0,0 +1,2 @@
+#next
+0.1a
diff --git a/usr/lib/learn/eqn/L0.1a b/usr/lib/learn/eqn/L0.1a
new file mode 100644 (file)
index 0000000..357826f
--- /dev/null
@@ -0,0 +1,49 @@
+#once #create message
+.EQ
+delim $$
+.EN
+.pl 1
+.ll 55
+This script is designed to teach you the "eqn" language
+for typing mathematics. 
+There are two versions of the program. "eqn" is for
+use on the phototypesetter; "neqn" is for use on a
+terminal like a DASI or GSI, or a Model 37 teletype.
+The lessons are mostly written under the assumption
+that you will be using neqn on a DASI or GSI or teletype;
+a few things that are specific to eqn on the typesetter are
+left to the end.
+
+The terminal MUST be a DASI or GSI or teletype,
+or you will get some rather startling results
+from this script.
+
+To verify that everything is working, this message
+should come out with subscripts, superscripts, Greek
+letters and so on.  If it doesn't, we're in
+trouble.
+.sp
+Summation sign: $ sum $
+.sp
+Letter pi: $ pi $
+.sp
+Subscript and superscript: $ x sub i ~=~ y sup j $
+.sp
+If this looks ok, type yes.  Otherwise, type no.
+.pl 1
+#
+#once neqn message | nroff -T$term
+#copyin
+#user
+#uncopyin
+#match yes
+#fail
+Do you have the right kind of terminal?
+If you are using a DASI or GSI, make
+sure the switch labeled "PLOT" inside the cover
+is set to ON.
+If these fail, call for help;
+otherwise type yes the next time.
+#log
+#next
+1.1a
diff --git a/usr/lib/learn/eqn/L1.1a b/usr/lib/learn/eqn/L1.1a
new file mode 100644 (file)
index 0000000..fbcee8d
--- /dev/null
@@ -0,0 +1,35 @@
+#print
+To properly print a file containing an equation,
+you have to type a longer-than-usual command line.
+If you are using a DASI or GSI, to print a file
+"math" that contains mathematics, you must say
+
+  neqn math | nroff -Txxx
+
+where "-Txxx" describes the terminal you are using.
+This is usually one of
+  -T300
+  -T300S
+  -T450
+It is very important that you get this line right.
+If you don't, you'll not be happy with your output.
+
+In this directory is a file called "Example"; print
+it properly, using whichever command line is 
+appropriate to your terminal.
+Then type "ready".
+#once #create Example
+This is a little file that contains an
+example of a subscript and superscript:
+.ce
+.EQ
+a sub i + b sub i ~=~ c sub i sup 2
+.EN
+.pl 1
+#copyin
+#user
+#uncopyin
+grep 'neqn Example *| *nroff -T' <.copy >/dev/null
+#log
+#next
+1.1b 10
diff --git a/usr/lib/learn/eqn/L1.1b b/usr/lib/learn/eqn/L1.1b
new file mode 100644 (file)
index 0000000..60c00a6
--- /dev/null
@@ -0,0 +1,51 @@
+#print
+Most technical papers and memos consist of normal text
+interspersed with occasional (or frequent) mathematical
+expressions, such as the ones in the last lesson.
+To tell neqn that something is mathematics, not normal
+text, you must surround it by two "commands":
+
+   A line that begins with
+   .EQ
+   marks the start of an expression.
+
+   A line that begins with
+   .EN
+   marks the end of the expression.
+
+Thus, the lines
+.EQ
+x=y+1
+.EN
+represent the equation
+
+x=y+1
+
+The file "Example" in this directory has a line that contains
++ and - signs.  Make that line into an equation
+by adding .EQ and .EN before and after.
+Print "Example" with neqn and nroff (and the appropriate -Txxx),
+then type "ready".
+#once #create Ref
+This is a tiny little text
+that includes one equation
+or at least it will when you find this line:
+.ce
+.EQ
+a = b + c - d
+.EN
+and convert it into an equation.
+.pl 1
+#once #create Example
+This is a tiny little text
+that includes one equation
+or at least it will when you find this line:
+.ce
+a = b + c - d
+and convert it into an equation.
+.pl 1
+#user
+#cmp Ref Example
+#log
+#next
+1.1c 10
diff --git a/usr/lib/learn/eqn/L1.1c b/usr/lib/learn/eqn/L1.1c
new file mode 100644 (file)
index 0000000..77edb1f
--- /dev/null
@@ -0,0 +1,39 @@
+#print
+It is usually wise to do your formatting with
+the "-ms" macro package developed by Mike Lesk, since
+it does a lot of dirty work for you without any effort
+on your part.
+One of the things "-ms" does is to arrange that equations
+are "displayed" - that is, that they are neatly centered
+and set off from the surrounding text.
+Most of the "-ms" package is described in another script
+called "macros", which you may have already learned.
+For now, we need only know this much: to use "-ms"
+with neqn, add "-ms" to your command line, right after
+the word "nroff", like this
+
+  neqn files... | nroff -ms -Txxx
+
+Notice where the "-ms" goes.
+
+In this directory is a file called "Example".
+To prove that you can type the "-ms" in the right place,
+print "Example" with "-ms", then type "ready".
+#once #create Example
+.PP
+This is a tiny little text
+that includes one equation
+or at least it will when you find this line:
+.EQ
+x sub i = y sub i
+.EN
+and convert it into an equation.
+(Naturally I changed it.)
+.pl 1
+#copyin
+#user
+#uncopyin
+grep 'neqn Example *| *nroff -ms' <.copy >/dev/null
+#log
+#next
+1.1d 10
diff --git a/usr/lib/learn/eqn/L1.1d b/usr/lib/learn/eqn/L1.1d
new file mode 100644 (file)
index 0000000..949d4fa
--- /dev/null
@@ -0,0 +1,34 @@
+#print
+The "-ms" package lets you do some other nice things as
+well.  For example, you can arrange for a number to be
+placed on an equation, in the right margin:
+
+  a = b + c - d                               (1.23)
+
+by placing the number after the .EQ on the same line,
+like this:
+
+.EQ (1.23)
+
+You must leave a space between .EQ and the number.
+
+In the file "Example", number the equation "17.1a"
+and print it properly with neqn and nroff -ms.
+(Don't forget -Txxx for your terminal.)
+Then type "ready".
+#once #create Example
+.PP
+This is a tiny little text
+that includes one equation
+or at least it will when you find this line:
+.EQ
+x sub i = y sub i + z sub i
+.EN
+and convert it into an equation.
+(Naturally I changed it again.)
+.pl 1
+#user
+grep '\.EQ  *17\.1a$' <Example >/dev/null
+#log
+#next
+1.1e 10
diff --git a/usr/lib/learn/eqn/L1.1e b/usr/lib/learn/eqn/L1.1e
new file mode 100644 (file)
index 0000000..bec107f
--- /dev/null
@@ -0,0 +1,30 @@
+#print
+So far all the equations have been centered, which is what
+"-ms" does unless you tell it differently.
+You can also arrange for equations to be left-adjusted -
+that is, right up against the left margin - by saying
+  .EQ L
+If there is a number, place it _____\b\b\b\b\bafter the L, separated by a
+space, like this:
+  .EQ L (3a)
+
+Make the equation in "Example" left-justified with
+the number (3.1a) in the right margin and print it
+to make sure everything works.  Then type "ready".
+#once #create Example
+.PP
+This is a tiny little text
+(which you're undoubtedly sick of by now)
+that includes one equation
+or at least it will when you find this line:
+.EQ
+x sup i = y sup i
+.EN
+and convert it into an equation.
+(Naturally I changed it.)
+.pl 1
+#user
+grep '\.EQ  *L  *(3.1a)$' <Example >/dev/null
+#log
+#next
+1.1f 10
diff --git a/usr/lib/learn/eqn/L1.1f b/usr/lib/learn/eqn/L1.1f
new file mode 100644 (file)
index 0000000..72d7e53
--- /dev/null
@@ -0,0 +1,87 @@
+#print
+You can also make equations that are ________\b\b\b\b\b\b\b\bindented a fixed amount from
+the left margin, with the command
+  .EQ I
+Again, if there is an equation number, it follows the I.
+
+Convert all the equations in "Example" to indented ones.
+(Naturally I've changed it.)
+You can do this with a single editor command.
+
+Print "Example" with neqn and nroff -ms,
+then type "ready".
+#once #create Ref
+.LP
+     EQUIVALENCES OF ONE SORT AND ANOTHER
+.LP
+.EQ I (2.01)
+bold x sup { n alpha } (t) ~->~ bold x sup alpha ( bold X ,t).
+.EN
+.sp
+.EQ I (2.02)
+sum from n F( bold x sup { n alpha } (t))
+~->~ 1 over OMEGA INT F( bold x sup alpha ( bold X ,t))d bold \|X
+.EN
+.EQ I (2.03)
+bold x ( bold X ,t) ~==~
+sum from  { alpha =1} to  N
+rho sup alpha  over rho sup 0 bold x sup alpha ( bold X ,t)
+.EN
+.EQ I (2.08)
+sum from  {alpha =1} to  N
+U sup { mu alpha } V sup { mu alpha } ~=~ delta sup { mu nu }
+.EN
+.EQ I (2.06)
+bold y sup { T mu } ( bold X ,t) 
+~==~ sum from  {alpha =1} to  N
+U sup { mu alpha }
+bold x sup alpha
+( bold X ,t)
+.EN
+.EQ I
+~ partial over {partial d} 
+ ( epsilon sub 0 bold E sup T times  bold B ) sub i  
+- m sub ij,\|j ~=~
+-q sup D E sub i sup T
+-( bold ~j sup D times bold B ) sub i
+.EN
+#once #create Example
+.LP
+     EQUIVALENCES OF ONE SORT AND ANOTHER
+.LP
+.EQ (2.01)
+bold x sup { n alpha } (t) ~->~ bold x sup alpha ( bold X ,t).
+.EN
+.sp
+.EQ (2.02)
+sum from n F( bold x sup { n alpha } (t))
+~->~ 1 over OMEGA INT F( bold x sup alpha ( bold X ,t))d bold \|X
+.EN
+.EQ (2.03)
+bold x ( bold X ,t) ~==~
+sum from  { alpha =1} to  N
+rho sup alpha  over rho sup 0 bold x sup alpha ( bold X ,t)
+.EN
+.EQ (2.08)
+sum from  {alpha =1} to  N
+U sup { mu alpha } V sup { mu alpha } ~=~ delta sup { mu nu }
+.EN
+.EQ (2.06)
+bold y sup { T mu } ( bold X ,t) 
+~==~ sum from  {alpha =1} to  N
+U sup { mu alpha }
+bold x sup alpha
+( bold X ,t)
+.EN
+.EQ
+~ partial over {partial d} 
+ ( epsilon sub 0 bold E sup T times  bold B ) sub i  
+- m sub ij,\|j ~=~
+-q sup D E sub i sup T
+-( bold ~j sup D times bold B ) sub i
+.EN
+#user
+#cmp Ref Example
+#log
+#next
+2.1a 10
diff --git a/usr/lib/learn/eqn/L10.1a b/usr/lib/learn/eqn/L10.1a
new file mode 100644 (file)
index 0000000..71423a9
--- /dev/null
@@ -0,0 +1,77 @@
+#once #create message
+.ND
+.tr %$
+.EQ
+delim $$
+.EN
+.LP
+The next topic goes back to the problem of formatting
+equations on the page.  Sometimes it is desirable to
+line up one part of an equation with some part
+of a previous equation - for example, equals signs
+are often lined up like this:
+.EQ I
+x mark = y sub i
+.EN
+.EQ I
+lineup = z sub i
+.EN
+.EQ I
+x sub i + y sub i lineup = z sub i
+.EN
+
+To achieve this, you have to do several things.
+(1) tell neqn to remember the place where things are
+to be lined up, which is done by saying
+"mark" just before the thing you want remembered:
+  .EQ I
+  x mark = y sub i
+  .EN
+.br
+(2) Then, in successive equations, telling neqn
+to line up something on the previous mark, with
+"lineup":
+   .EQ I
+   lineup = z sub i
+   .EN
+.br
+(3) You ____\b\b\b\bhave __\b\bto use either ".EQ I" or ".EQ L";
+you can't line things up in a centered equation.
+
+For practice, modify "Example" so the
+equations are lined up on the equals signs, then
+type "ready".
+.pl 1
+#once #create Ref
+.LP
+A test of mark and lineup:
+.EQ I
+x sub i ~ mark =~ 1
+.EN
+.EQ I
+x sub i + y sub i ~ lineup = ~2
+.EN
+.pl 1
+#once #create Example
+.LP
+A test of mark and lineup:
+.EQ I
+x sub i ~ =~ 1
+.EN
+.EQ I
+x sub i + y sub i ~ =~ 2
+.EN
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#once neqn message Ref | nroff -T$term %s/tinyms -
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#fail
+Don't forget that tilde is a real character;
+put the mark and lineup after it.
+Remember .EQ I.
+#log
+#next
+10.1b 10
diff --git a/usr/lib/learn/eqn/L10.1b b/usr/lib/learn/eqn/L10.1b
new file mode 100644 (file)
index 0000000..5b5c389
--- /dev/null
@@ -0,0 +1,42 @@
+#print
+More practice with mark and lineup.
+Modify "Example" so the + signs are lined up in
+all of the equations, then type "ready".
+#once #create Ref
+.LP
+.EQ I
+x ~==~ a sub i ~ mark + ~ b sub i ~-~ c sub i
+.EN
+.EQ I
+lineup + ~ d sub i - e sub i
+.EN
+.EQ I
+lineup + ~ f sub i - g sub i
+.EN
+.EQ I
+lineup + ~ ...
+.EN
+.pl 1
+#once #create Example
+.LP
+.EQ I
+x ~==~ a sub i ~ + ~ b sub i ~-~ c sub i
+.EN
+.EQ I
++ ~ d sub i - e sub i
+.EN
+.EQ I
++ ~ f sub i - g sub i
+.EN
+.EQ I
++ ~ ...
+.EN
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#log
+#next
+10.1c 10
diff --git a/usr/lib/learn/eqn/L10.1c b/usr/lib/learn/eqn/L10.1c
new file mode 100644 (file)
index 0000000..88e2c24
--- /dev/null
@@ -0,0 +1,25 @@
+#print
+There are several warnings in order about mark and lineup.
+First, remember that you must use ".EQ I" or ".EQ L".
+Second, there can only be one mark or one lineup in any given
+equation.
+Finally, what you are doing must make sense, or
+your results may be not what you wanted.
+
+Does this sequence produce output with the equals signs
+lined up?
+  .EQ L
+  x mark = y
+  .EN
+  .EQ L
+  x+y mark = z
+  .EN
+Answer yes or no.
+#copyin
+#user
+#uncopyin
+#match no
+#log
+#next
+11.1a 10
+10.2c 5
diff --git a/usr/lib/learn/eqn/L10.2c b/usr/lib/learn/eqn/L10.2c
new file mode 100644 (file)
index 0000000..53e1397
--- /dev/null
@@ -0,0 +1,17 @@
+#print
+Does this sequence produce output with the equals signs
+lined up?
+  .EQ I
+  x mark = y
+  .EN
+  .EQ I
+  x+y mark = z
+  .EN
+Answer yes or no.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+11.1a 10
diff --git a/usr/lib/learn/eqn/L11.1a b/usr/lib/learn/eqn/L11.1a
new file mode 100644 (file)
index 0000000..a03f703
--- /dev/null
@@ -0,0 +1,46 @@
+#once #create message
+.ND
+.tr %$
+.EQ
+delim $$
+.EN
+.LP
+We have introduced a fair number of "magic" words like
+sub and sup and over and pi and sum.  What happens if
+you need to print an equation that contains one of these
+words __\b\bas ____\b\b\b\btext, like this:
+.EQ
+e sub "pi"
+.EN
+
+The way to turn off special meanings of magic words is
+to enclose them in the double quotes "...".  The $e sub "pi"$
+was printed with
+  .EQ
+  e sub "pi"
+  .EN
+
+Using this knowledge, modify file "Example" so it produces output
+that looks like the following, then type "ready".
+.pl 1
+#once #create Ref
+.LP
+.EQ
+lim "sup" f( "pi" ) = p cdot i
+.EN
+.pl 1
+#once #create Example
+.LP
+.EQ
+lim sup f( pi ) = p cdot i
+.EN
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#once neqn message Ref | nroff -T$term %s/tinyms -
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#log
+#next
+11.1b 10
diff --git a/usr/lib/learn/eqn/L11.1b b/usr/lib/learn/eqn/L11.1b
new file mode 100644 (file)
index 0000000..06fa225
--- /dev/null
@@ -0,0 +1,34 @@
+#once #create message
+.ND
+.tr %$
+.EQ
+delim $$
+.EN
+.LP
+The quoting mechanism can also be used to turn off the special meaning
+of things like the dollar sign and braces.
+Modify "Example" so it prints the following output, then
+type "ready".
+.pl 1
+#
+#once #create Ref
+.EQ
+delim $$
+.EN
+.LP
+The cost of processing is proportional to
+$characters over "$"$.
+.pl 1
+#once #create Example
+.LP
+The cost of processing is proportional to
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#once neqn message Ref | nroff -T$term %s/tinyms -
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#log
+#next
+11.1c 10
diff --git a/usr/lib/learn/eqn/L11.1c b/usr/lib/learn/eqn/L11.1c
new file mode 100644 (file)
index 0000000..3b669c8
--- /dev/null
@@ -0,0 +1,31 @@
+#once #create message
+.ND
+.tr %$
+.EQ
+delim $$
+.EN
+.LP
+Modify "Example" so it prints the following output, then
+type "ready".
+.pl 1
+#once #create Ref
+.EQ
+delim $$
+.EN
+.LP
+The cost of processing is proportional to
+${ "{" characters "}" } over "$"$.
+.pl 1
+#once #create Example
+.LP
+The cost of processing is proportional to
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#once neqn message Ref | nroff -T$term %s/tinyms -
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#log
+#next
+11.1d 10
diff --git a/usr/lib/learn/eqn/L11.1d b/usr/lib/learn/eqn/L11.1d
new file mode 100644 (file)
index 0000000..8b75ceb
--- /dev/null
@@ -0,0 +1,18 @@
+#print
+One thing to keep in mind, although it generally
+isn't going to affect you, is that the quote "
+is a delimiter just like blank or tilde -
+it turns off subscripts and superscripts, and so
+on. 
+Experiment a bit, and decide if
+  e sup "{t}"
+is the same as
+  e sup "{"t"}"
+Type yes if they are the same, no if they are different.
+#copyin
+#user
+#uncopyin
+#match no
+#log
+#next
+11.1e 10
diff --git a/usr/lib/learn/macros/L0 b/usr/lib/learn/macros/L0
new file mode 100644 (file)
index 0000000..40bb3a2
--- /dev/null
@@ -0,0 +1,2 @@
+#next
+1.1a 5
diff --git a/usr/lib/learn/macros/L1.1a b/usr/lib/learn/macros/L1.1a
new file mode 100644 (file)
index 0000000..905c08c
--- /dev/null
@@ -0,0 +1,23 @@
+#print
+This script deals with the use of the "-ms" macro
+package to produce Bell Laboratories style documents.
+Before trying it, you should be familiar with the
+editor.  To test that, please enter the file
+typed below, _______\b\b\b\b\b\b\bexactly __\b\bas __\b\bis, into file "decl".  Then
+type "ready".
+
+#create Ref
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+#print Ref
+#user
+#cmp decl Ref
+#log
+#next
+2.1a 10
diff --git a/usr/lib/learn/macros/L10.1a b/usr/lib/learn/macros/L10.1a
new file mode 100644 (file)
index 0000000..be79049
--- /dev/null
@@ -0,0 +1,52 @@
+#print
+What if you don't want the cover sheet?  Nroff has
+an option to print only special pages.  In particular,
+  nroff -ms -o1- files ...
+will begin printing at page 1, and skip page 0, the cover sheet.
+If you only want the cover sheet, you need the command
+  nroff -ms -o0 files ...
+which prints only page zero.  Try printing
+only the cover sheet of the file "decl".
+Then type "ready" as usual.
+#once nroff -ms -o0 decl >X1 &
+#create decl
+.RP
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+11.1a 10
diff --git a/usr/lib/learn/macros/L11.1a b/usr/lib/learn/macros/L11.1a
new file mode 100644 (file)
index 0000000..a58f7d4
--- /dev/null
@@ -0,0 +1,96 @@
+#print
+The most complex format is the TM (technical memorandum)
+format.  If you use that, instead of the IM format,
+you get the usual "MEMORANDUM FOR FILE" message.  In addition,
+you usually want to specify the TM number, case numbers, and
+so forth.  The command line for TM format (which should also
+be the first line given) should read:
+
+  .TM memo-no. case-no. filing-no.
+
+so that, for example, the command line
+
+   .TM 75-1274-1 39199 39199-11
+
+indicates a TM number of 75-1274-1, a charging case number
+of 39199, and a filing case number of 39199-11.  Suppose the
+number for this memo is
+ 75-1776-1
+and the charging and filing cases are both
+ 12345
+Edit the file "decl" for TM format and run it off.
+#create Ref
+.TM 75-1776-1 12345 12345
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.IM
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+12.1a 10
diff --git a/usr/lib/learn/macros/L12.1a b/usr/lib/learn/macros/L12.1a
new file mode 100644 (file)
index 0000000..a9b1c87
--- /dev/null
@@ -0,0 +1,100 @@
+#print
+With a TM you want a cover sheet.  The cover sheet doesn't look too
+nice when printed on a computer terminal, but you should
+know how to set it up so that you can put it on the typesetter,
+which does an attractive job of imitating the official  printed
+form.  Basically you must make two changes to get a cover sheet
+with normal formatting.  First, you should add to each .AU line
+the author's room number and extension.  For example,
+  .AU "MH 2C-569" "6377"
+  M. E. Lesk
+indicates that Lesk's room is MH 2C-569 and his extension is 6377.
+The room number is enclosed in quotes to indicate that it is one
+unit, even though it contains a blank.  The quotes around
+the extension are harmless but unnecessary.  Also, you
+must add the command
+  .CS 1 2 3 4 5 6
+after the ".AE" line.  The six numbers are (from left to right)
+the number of pages of text, number of pages of "other",
+the total number of pages, the number of references, the number
+of figures and the number of tables.  Try editing
+the usual file "decl" to indicate that Mr. Jefferson's
+room number is MH 2A-111 and his extension is 1776.
+Request a cover sheet with the above meaningless numbers,
+just to see where they go.  Then run off the document again.
+#create Ref
+.TM 75-1776-1 12345 12345
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.TM 75-1776-1 12345 12345
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -132 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+13.1a 10
diff --git a/usr/lib/learn/macros/L13.1a b/usr/lib/learn/macros/L13.1a
new file mode 100644 (file)
index 0000000..1375887
--- /dev/null
@@ -0,0 +1,104 @@
+#print
+A couple of details about TM formats.
+(1) The computer has this habit of putting the real date on things.
+Typically BTL authors wish to lie about the date.  There is a command
+for this:
+  .DA July 4, 1776
+will replace the current date everywhere by the specified date.
+(2) Also about the date: most people don't like it on each page.
+The normal date command is thus:
+  .ND July 4, 1776
+which says "no date on each page; in the TM heading area where
+the date is needed, use July 4, 1776".
+Either date command should be placed just after the .TM line.
+(3) There may be other keywords.  These are indicated by
+the sequence
+  .OK
+  word 1
+  word 2
+inserted before the .AB line.
+All right.  Change "decl" to show a date of July 4, 1776,
+using the ".ND" date command; and add as "other keywords"
+"Democracy" and "Tyranny".  Then run off ONLY the cover
+sheet (remember nroff -ms -o0 file ...?).  End with "ready".
+#create Ref
+.TM 75-1776-1 12345 12345
+.ND July 4, 1776
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.OK
+Democracy
+Tyranny
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms -o0 Ref >X1 &
+#create decl
+.TM 75-1776-1 12345 12345
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+14.1a 10
diff --git a/usr/lib/learn/macros/L14.1a b/usr/lib/learn/macros/L14.1a
new file mode 100644 (file)
index 0000000..fd8ef9b
--- /dev/null
@@ -0,0 +1,104 @@
+#print
+What if there are several authors?  Well, you use several .AU
+commands.  Suppose we promote Richard Henry Lee to co-author
+of our file "decl".  Then we could have
+  .TM memo and case numbers
+  .ND fake date
+  .TL
+  Declaration of Independence
+  .AU room and phone for Jefferson
+  Thomas Jefferson
+  .AU room and phone for Lee
+  Richard Henry Lee
+  .AI
+  as before ...
+as the top of the file.     Rearrange "decl" this way
+and run it off.  Then type "ready".
+Make Lee's room number MH 2B-222 and his extension 1824.
+#create Ref
+.TM 75-1776-1 12345 12345
+.ND July 4, 1776
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AU "MH 2B-222" 1824
+Richard Henry Lee
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.OK
+tyranny
+democracy
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.TM 75-1776-1 12345 12345
+.ND July 4, 1776
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.OK
+tyranny
+democracy
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -132 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+15.1a 10
diff --git a/usr/lib/learn/macros/L15.1a b/usr/lib/learn/macros/L15.1a
new file mode 100644 (file)
index 0000000..1418c23
--- /dev/null
@@ -0,0 +1,306 @@
+#print
+Here's a new document.  In the file "Ascent" is a supposed memo.
+It begins immediately with the text, but the paragraphs are
+marked with ".PP" commands.  Add the initial material
+as follows and run it of as a TM:
+  Title: Ascending the Riffelberg
+  Author: Mark Twain
+  Author's address:  Hannibal, Mo.
+  TM number: 75-1868-1
+  Case number 39199
+  File number: 39425-2
+  Author's room number:  MH 2C-520
+  Author's extension:  9876
+  Abstract:
+    Why climb Everest?
+    Because it is there, said Mallory.
+  Other keywords: Mountaineering
+  Cover sheet numbers: just use 1 2 3 4 5 6 
+OK?  You can still look at "decl" to see the format.
+#create Ref
+.TM 75-1868-1 39199 39425-2
+.TL
+Ascending the Riffelberg
+.AU "MH 2C-520" 9876
+Mark Twain
+.AI
+Hannibal, Mo.
+.OK
+Mountaineering
+.AB
+Why climb Everest?
+Because it is there, said Mallory.
+.AE
+.CS 1 2 3 4 5 6
+.PP
+I sat silent some time, then turned to Harris and said:
+``My mind is made up.''
+Something in my tone struck him; and when he glanced
+at my eye and read what was written there, his face paled
+perceptibly.  He hesitated a moment, then said:
+``Speak.''
+I answered, with perfect calmness:
+``I WILL ASCEND THE RIFFELBERG.''
+If I had shot my poor friend he could not have fallen from
+his chair more suddenly.  If I had been his father he
+could not have pleaded harder to get me to give up my
+purpose.  But I turned a deaf ear to all he said.  When he
+perceived at last that nothing could alter my determination,
+he ceased to urge, and for a while the deep silence was broken only
+by his sobs.  I sat in marble resolution, with my
+eyes fixed upon vacancy, for in spirit I was already
+wrestling with the perils of the mountains, and my friend sat
+gazing at me in adoring admiration through his tears.  At
+last he threw himself upon me in a loving embrace and
+exclaimed in broken tones:
+``Your Harris will never desert you.  We will die together!''
+I cheered the noble fellow with praises, and soon his fears
+were forgotten and he was eager for the adventure.  He
+wanted to summon the guides at once and leave at two in
+the morning, as he supposed the custom was; but I explained that nobody
+was looking at that hour; and that the start in the dark
+was not usually made from the village but
+from the first night's resting-place on the mountainside.  I
+said we would leave the village at 3 or 4 p.m. on the morrow;
+meantime he could notify the guides, and also let the public
+know of the attempt which we proposed to make.
+.PP
+I went to bed, but not to sleep.  No man can sleep when
+he is about to undertake one of these Alpine exploits.  I
+tossed feverishly all night long, and was glad enough when
+I heard the clock strike half past eleven and knew it was
+time to get up for dinner.  I rose, jaded and rusty, and went
+to the noon meal, where I found myself the center of interest and
+curiosity; for the news was already abroad.  It is not
+easy to eat calmly when you are a lion, but it is very
+pleasant, nevertheless.
+.PP
+As usual, at Zermatt, when a great ascent is about to be
+undertaken, everybody, native and foreign, laid aside his
+own projects and took up a good position to observe the
+start.  The expedition consisted of 198 persons, including
+the mules; or 205, including the cows.
+.PP
+It was full four o'clock in the afternoon before my cavalcade
+was entirely ready.  At that hour it began to move.  In
+point of numbers and spectacular effect, it was the most
+imposing expedition that had ever marched from Zermatt.
+.PP
+I commanded the chief guide to arrange the men and
+animals in single file, twelve feet apart, and lash them all
+together on a strong rope.  He objected that the first two
+miles was a dead level, with plenty of room, and that the
+rope was never used except in very dangerous places.  But I
+would not listen to that.  My reading had taught me that
+many serious accidents had happened in the Alps simply
+from not having the people tied up soon enough; I was not
+going to add one to the list.  The guide then obeyed my
+order.
+.PP
+When the procession stood at ease, roped together, and
+ready to move, I never saw a finer sight.  It was 3,122 feet
+long - over half a mile; every man but Harris and me was
+on foot, and had on his green veil and his blue goggles, and
+his white rag around his hat, and his coil of rope over one
+shoulder and under the other, and his ice-ax in his belt,
+and carried his Alpenstock in his left hand, his umbrella
+(closed) in his right, and his crutches slung at his back.
+.PP
+The burdens of the pack-mules and the horns of the cows
+were decked with the Edelweiss and the Alpine rose.
+.PP
+I and my agent were the only persons mounted.  We
+were in the post of danger in the extreme rear, and tied
+securely to five guides apiece.  Our armor-bearers carried our
+ice-axes, Alpenstocks, and other implements for us.  We
+were mounted upon very small donkeys, as a measure of
+safety; in time of peril we could straighten our legs and
+stand up, and let the donkey walk from under.  Still, I cannot
+recommend this sort of animal - at least for excursions
+of mere pleasure - because his ears interrupt the view.  I
+and my agent possessed the regulation mountaineering costumes,
+but concluded to leave them behind.  Out of respect
+for the great numbers of tourists of both sexes who would
+be assembled in front of the hotels to see us pass, and also
+out of respect for the many tourists whom we expected to
+encounter on our expedition, we decided to make the
+ascent in evening dress.
+.PP
+At fifteen minutes past four I gave the command to
+move, and my subordinates passed it along the line.  The
+great crowd in front of the Monte Rosa hotel parted in
+twain, with a cheer, as the procession approached; and as
+the head of it was filing by I gave the order - unlimber -
+make ready - hoist - and with one impulse up went my
+half-mile of umbrellas.  It was a beautiful sight, and a total
+surprise to the spectators.  Nothing like that had ever been
+seen in the Alps before.  The applause it brought forth was
+deeply gratifying to me, and I rode by with my plug hat in
+my hand to testify my appreciation of it.  It was the only
+testimony I could offer, for I was too full to speak.
+#once #create Ascent
+.PP
+I sat silent some time, then turned to Harris and said:
+``My mind is made up.''
+Something in my tone struck him; and when he glanced
+at my eye and read what was written there, his face paled
+perceptibly.  He hesitated a moment, then said:
+``Speak.''
+I answered, with perfect calmness:
+``I WILL ASCEND THE RIFFELBERG.''
+If I had shot my poor friend he could not have fallen from
+his chair more suddenly.  If I had been his father he
+could not have pleaded harder to get me to give up my
+purpose.  But I turned a deaf ear to all he said.  When he
+perceived at last that nothing could alter my determination,
+he ceased to urge, and for a while the deep silence was broken only
+by his sobs.  I sat in marble resolution, with my
+eyes fixed upon vacancy, for in spirit I was already
+wrestling with the perils of the mountains, and my friend sat
+gazing at me in adoring admiration through his tears.  At
+last he threw himself upon me in a loving embrace and
+exclaimed in broken tones:
+``Your Harris will never desert you.  We will die together!''
+I cheered the noble fellow with praises, and soon his fears
+were forgotten and he was eager for the adventure.  He
+wanted to summon the guides at once and leave at two in
+the morning, as he supposed the custom was; but I explained that nobody
+was looking at that hour; and that the start in the dark
+was not usually made from the village but
+from the first night's resting-place on the mountainside.  I
+said we would leave the village at 3 or 4 p.m. on the morrow;
+meantime he could notify the guides, and also let the public
+know of the attempt which we proposed to make.
+.PP
+I went to bed, but not to sleep.  No man can sleep when
+he is about to undertake one of these Alpine exploits.  I
+tossed feverishly all night long, and was glad enough when
+I heard the clock strike half past eleven and knew it was
+time to get up for dinner.  I rose, jaded and rusty, and went
+to the noon meal, where I found myself the center of interest and
+curiosity; for the news was already abroad.  It is not
+easy to eat calmly when you are a lion, but it is very
+pleasant, nevertheless.
+.PP
+As usual, at Zermatt, when a great ascent is about to be
+undertaken, everybody, native and foreign, laid aside his
+own projects and took up a good position to observe the
+start.  The expedition consisted of 198 persons, including
+the mules; or 205, including the cows.
+.PP
+It was full four o'clock in the afternoon before my cavalcade
+was entirely ready.  At that hour it began to move.  In
+point of numbers and spectacular effect, it was the most
+imposing expedition that had ever marched from Zermatt.
+.PP
+I commanded the chief guide to arrange the men and
+animals in single file, twelve feet apart, and lash them all
+together on a strong rope.  He objected that the first two
+miles was a dead level, with plenty of room, and that the
+rope was never used except in very dangerous places.  But I
+would not listen to that.  My reading had taught me that
+many serious accidents had happened in the Alps simply
+from not having the people tied up soon enough; I was not
+going to add one to the list.  The guide then obeyed my
+order.
+.PP
+When the procession stood at ease, roped together, and
+ready to move, I never saw a finer sight.  It was 3,122 feet
+long - over half a mile; every man but Harris and me was
+on foot, and had on his green veil and his blue goggles, and
+his white rag around his hat, and his coil of rope over one
+shoulder and under the other, and his ice-ax in his belt,
+and carried his Alpenstock in his left hand, his umbrella
+(closed) in his right, and his crutches slung at his back.
+.PP
+The burdens of the pack-mules and the horns of the cows
+were decked with the Edelweiss and the Alpine rose.
+.PP
+I and my agent were the only persons mounted.  We
+were in the post of danger in the extreme rear, and tied
+securely to five guides apiece.  Our armor-bearers carried our
+ice-axes, Alpenstocks, and other implements for us.  We
+were mounted upon very small donkeys, as a measure of
+safety; in time of peril we could straighten our legs and
+stand up, and let the donkey walk from under.  Still, I cannot
+recommend this sort of animal - at least for excursions
+of mere pleasure - because his ears interrupt the view.  I
+and my agent possessed the regulation mountaineering costumes,
+but concluded to leave them behind.  Out of respect
+for the great numbers of tourists of both sexes who would
+be assembled in front of the hotels to see us pass, and also
+out of respect for the many tourists whom we expected to
+encounter on our expedition, we decided to make the
+ascent in evening dress.
+.PP
+At fifteen minutes past four I gave the command to
+move, and my subordinates passed it along the line.  The
+great crowd in front of the Monte Rosa hotel parted in
+twain, with a cheer, as the procession approached; and as
+the head of it was filing by I gave the order - unlimber -
+make ready - hoist - and with one impulse up went my
+half-mile of umbrellas.  It was a beautiful sight, and a total
+surprise to the spectators.  Nothing like that had ever been
+seen in the Alps before.  The applause it brought forth was
+deeply gratifying to me, and I rode by with my plug hat in
+my hand to testify my appreciation of it.  It was the only
+testimony I could offer, for I was too full to speak.
+#once nroff -ms Ref >X1 &
+#create decl
+.TM 75-1776-1 12345 12345
+.ND July 4, 1776
+.TL
+Declaration of Independence
+.AU "MH 2A-111" 1776
+Thomas Jefferson
+.AU "MH 2B-222" 1824
+James Madison
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.OK
+tyranny
+democracy
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#create script
+1,$-264d
+w
+q
+#copyout
+#user
+#uncopyout
+e - .ocopy <script
+#cmp X1 .ocopy
+#fail
+Sorry, that wasn't right.
+
+To see exactly what you are doing, after
+making your insertions, compare the file
+with file "Ref" using "diff".
+
+OK, maybe you'll get a chance to do it over:
+
+#log
diff --git a/usr/lib/learn/macros/L2.1a b/usr/lib/learn/macros/L2.1a
new file mode 100644 (file)
index 0000000..b1ea3db
--- /dev/null
@@ -0,0 +1,25 @@
+#print
+When you have some document typed in "-ms" style,
+you run it off on your terminal by saying:
+
+  nroff -ms file
+
+where "file" is the name of the file it is on.  For example,
+the file "decl" in this directory is in a suitable format
+for running off this way.  Do so.  Then type "ready".
+#create decl
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+#copyin
+#user
+#uncopyin
+#match nroff -ms decl
+#log
+#next
+3.1a 10
diff --git a/usr/lib/learn/macros/L3.1a b/usr/lib/learn/macros/L3.1a
new file mode 100644 (file)
index 0000000..c13e135
--- /dev/null
@@ -0,0 +1,70 @@
+#print
+The file "decl" began with ".PP".  All files sent
+to -ms MUST begin with a "-ms" command line.  You can
+tell these command lines, in general, because they
+begin with a period and have only capital letters on them.
+The ".PP" command indicates a new paragraph.
+So to add another paragraph to a file, you put a ".PP"
+in front and then type in the new text.  Here is the
+next paragraph of the declaration of independence.  Add
+it to the end of the file "decl" that you've been working
+with.  You can do that most easily by picking up the text
+from file "para2", or you can type it in again.  It is
+not necessary to keep every word on exactly
+the line it was, since the program will rearrange them.
+But the ".PP" must be on a line by itself.  Then
+run off the the new version.
+
+
+#create Ref
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X2 &
+#create decl
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+#create para2
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#print para2
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X1
+#cmp X1 X2
+#log
+#next
+4.1a 10
diff --git a/usr/lib/learn/macros/L4.1a b/usr/lib/learn/macros/L4.1a
new file mode 100644 (file)
index 0000000..a6acce2
--- /dev/null
@@ -0,0 +1,65 @@
+#print
+Usually, of course, a document contains more than
+just paragraphs.  In particular, most
+documents have titles, which are entered with "-ms"
+by saying
+  .TL
+  title goes here
+  .PP
+  paragraphs of documents...
+There is the same "decl" file here: add a title
+"Declaration of Independence" and
+run it off again.
+#create Ref
+.TL
+Declaration of Independence
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X2 &
+#create decl
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X1
+#cmp X1 X2
+#log
+#next
+5.1a 10
diff --git a/usr/lib/learn/macros/L5.1a b/usr/lib/learn/macros/L5.1a
new file mode 100644 (file)
index 0000000..cdcf816
--- /dev/null
@@ -0,0 +1,69 @@
+#print
+Also, most documents have one or more authors.
+Authors are indicated by a preceding line of ".AU".
+Thus you would say
+ .TL
+  title
+ .AU
+  author
+ .PP
+  text
+OK, edit "decl" again: the author is Thomas Jefferson.
+Insert this and run the document off.
+#create Ref
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X2 &
+#create decl
+.TL
+Declaration of Independence
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X1
+#cmp X1 X2
+#log
+#next
+6.1a 10
diff --git a/usr/lib/learn/macros/L6.1a b/usr/lib/learn/macros/L6.1a
new file mode 100644 (file)
index 0000000..ec640d4
--- /dev/null
@@ -0,0 +1,74 @@
+#print
+Usually, in addition to the author, you want
+to specify his address, 
+which is given after a command ".AI" (Author's institution).
+This should follow immediately after the author's name.
+In the usual file, "decl", put in Jefferson's
+address as
+
+The Continental Congress
+Philadelphia, Pa. 19104
+
+Then run it off and type "ready".
+#create Ref
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1   &
+#create decl
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+7.1a 10
diff --git a/usr/lib/learn/macros/L7.1a b/usr/lib/learn/macros/L7.1a
new file mode 100644 (file)
index 0000000..07de402
--- /dev/null
@@ -0,0 +1,80 @@
+#print
+Another standard feature of scientific papers, although
+not always present is an abstract.  It should be placed
+after the author's institution, but before the text,
+and surrounded by the commands ".AB" and ".AE".
+Let's make up an imaginary abstract - how about
+
+  This paper describes advances in scattering
+  theory of colonies from mother countries.
+
+Add this to the usual "decl" file and run it off.
+#create Ref
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X2 X1
+#log
+#next
+8.1a 10
diff --git a/usr/lib/learn/macros/L8.1a b/usr/lib/learn/macros/L8.1a
new file mode 100644 (file)
index 0000000..eb815f0
--- /dev/null
@@ -0,0 +1,82 @@
+#print
+So far we have run this off in a sort of proofreading format
+that includes all the data but doesn't really look like anything
+in the BTL style guide.  It is possible, preceding the
+title, to put one of three commands to indicate a particular
+Bell Laboratories format.  The simplest of these is .IM
+(internal memorandum).  Try putting .IM in front of the
+text; then run it off and see what it looks like.
+#create Ref
+.IM
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -66 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+9.1a 10
diff --git a/usr/lib/learn/macros/L9.1a b/usr/lib/learn/macros/L9.1a
new file mode 100644 (file)
index 0000000..c5ca4f9
--- /dev/null
@@ -0,0 +1,83 @@
+#print
+The next format to mention is the RP (released paper)
+format.  If you use that, instead of the IM format,
+you get the standard Bell Labs released paper style.
+Change the first line of file "decl" to read
+  .RP
+and run it off.  Note that you get a cover page as well as the
+first page.
+#create Ref
+.RP
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#once nroff -ms Ref >X1 &
+#create decl
+.IM
+.TL
+Declaration of Independence
+.AU
+Thomas Jefferson
+.AI
+The Continental Congress
+Philadelphia, Pa. 19104
+.AB
+This paper describes advances in scattering theory
+of colonies from mother countries.
+.AE
+.PP
+When in the course of human events, it becomes
+necessary for one people to dissolve the political bands which have
+connected them with another, and to assume among the 
+powers of the earth the separate and equal station to which
+the laws of Nature and of Nature's God entitle them, a decent
+respect to the opinions of mankind requires that they should
+declare the causes which impel them to the separation.
+.PP
+We hold these truths to be self-evident, that all men
+are created equal, that they are endowed by their creator
+with certain unalienable rights, that among these are life, liberty,
+and the pursuit of happiness.  That to secure these rights,
+governments are instituted among men, deriving their just
+powers from the consent of the governed.  That whenever
+any form of government becomes destructive of these ends,
+it is the right of the people to alter or to abolish it, and
+to institute new government, laying its foundation on such
+principles and organizing its powers in such form, as to them
+shall seem most likely to effect their safety and happiness.
+#copyout
+#user
+#uncopyout
+tail -132 .ocopy >X2
+#cmp X1 X2
+#log
+#next
+10.1a 10
diff --git a/usr/lib/learn/morefiles/L0 b/usr/lib/learn/morefiles/L0
new file mode 100644 (file)
index 0000000..bab7601
--- /dev/null
@@ -0,0 +1,2 @@
+#next
+0.1a 10
diff --git a/usr/lib/learn/morefiles/L0.1a b/usr/lib/learn/morefiles/L0.1a
new file mode 100644 (file)
index 0000000..e6d4f44
--- /dev/null
@@ -0,0 +1,21 @@
+#print
+In the basic files course you learned about the "ls" command
+for listing the names of files in the current directory.
+You will now learn some of the extra abilities of "ls".
+UNIX maintains a lot more information about a file than just
+its name; this extra information includes the size of the
+file, the date and time it was last changed, the owner,
+and scattered other miscellany.  To see this "long" list of information,
+use the command "ls -l".  The "-l" is called an "optional argument",
+since it may or may not be present.
+
+To begin, try just "ls -l", then type "ready".
+#create junk
+this is garbage
+#copyin
+#user
+#uncopyin
+#match ls -l
+#log
+#next
+0.1b 10
diff --git a/usr/lib/learn/morefiles/L0.1b b/usr/lib/learn/morefiles/L0.1b
new file mode 100644 (file)
index 0000000..b787b60
--- /dev/null
@@ -0,0 +1,35 @@
+#print
+The first line, that says "total N", is a measure of how much
+file space is being used by the files in this directory.
+The part of the listing that says something like
+"-rw-rw-r--" gives the read and write
+permissions for the file -- in effect,
+who can do what to it.
+The second field is the number of "links" to the file.
+We won't worry about these two right now.
+
+The name in the third field is the owner of the file.
+The fourth field is the size of the file in characters,
+which is often interesting.  The rest of the listing
+is the date and time the file was last changed, and
+its name.
+
+What is the smallest file in this directory?
+(Don't use the previous list - I've changed things.)
+Type "answer name", where "name" is the name of the
+smallest file.
+#create kseq
+stuff
+#create jseq
+morestf
+#create X1
+morestuf
+#create X2
+moremore
+#copyin
+#user
+#uncopyin
+#match .copy
+#log
+#next
+0.1c 10
diff --git a/usr/lib/learn/morefiles/L0.1c b/usr/lib/learn/morefiles/L0.1c
new file mode 100644 (file)
index 0000000..a884e59
--- /dev/null
@@ -0,0 +1,13 @@
+#print
+How many characters are there in the file whose name begins
+with "r"?  Type "answer N", where N is the number of characters
+you found.
+#create ref
+hello world
+#copyin
+#user
+#uncopyin
+#match 12
+#log
+#next
+0.1d 10
diff --git a/usr/lib/learn/morefiles/L0.1d b/usr/lib/learn/morefiles/L0.1d
new file mode 100644 (file)
index 0000000..66404c1
--- /dev/null
@@ -0,0 +1,14 @@
+#print
+Is the file "ref" bigger than the file "ref1"?
+Answer yes or no.
+#create ref
+now is the time.
+#create ref1
+now is the time for all good men.
+#copyin
+#user
+#uncopyin
+#match no
+#log
+#next
+0.1e 10
diff --git a/usr/lib/learn/morefiles/L0.1e b/usr/lib/learn/morefiles/L0.1e
new file mode 100644 (file)
index 0000000..e9df942
--- /dev/null
@@ -0,0 +1,24 @@
+#print
+The list of file names from "ls" can also be obtained
+sorted by the date the file was most recently changed,
+with the newest files listed first.  This list is
+obtained by typing "ls -t".
+
+What is the oldest file in this directory?
+Type "answer name", where "name" is the oldest file.
+#create X1
+stuff
+#create X2
+stuff
+#create X3
+stuff
+#
+#copyin
+#user
+#uncopyin
+ls -t | tail -1 >X1
+tail -1 .copy >test
+#cmp X1 test
+#log
+#next
+0.1f 10
diff --git a/usr/lib/learn/morefiles/L0.1f b/usr/lib/learn/morefiles/L0.1f
new file mode 100644 (file)
index 0000000..c2d104b
--- /dev/null
@@ -0,0 +1,13 @@
+#print
+You can combine the optional arguments to "ls"; for example
+you can get the "long" list sorted by time of last change
+by saying
+  ls -lt
+Try that, then type "ready".
+#copyin
+#user
+#uncopyin
+#match ls -lt
+#log
+#next
+0.1g 10
diff --git a/usr/lib/learn/morefiles/L0.1g b/usr/lib/learn/morefiles/L0.1g
new file mode 100644 (file)
index 0000000..afe676d
--- /dev/null
@@ -0,0 +1,10 @@
+#print
+Is "ls -tl" identical to "ls -lt"?  Try it,
+then type yes or no.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+1.1a 10
diff --git a/usr/lib/learn/morefiles/L1.1a b/usr/lib/learn/morefiles/L1.1a
new file mode 100644 (file)
index 0000000..83d452f
--- /dev/null
@@ -0,0 +1,243 @@
+#print
+One of the more useful programs on Unix is "spell", which
+looks for spelling mistakes in a set of files.  Although spell
+is not perfect, it does a reasonable job of presenting you
+with a list of possibilities.  To look for mistakes in a set
+of files, you simply say
+
+   spell filenames
+
+and of course you can use shorthands like *, ? and [] to name
+the files.  For practice, there are some files whose names begin
+with "memo" in this directory; somewhere in one of them
+is a legitimate spelling mistake.  Use spell to find it, then
+type "answer word", where "word" is the mistake.
+Spell may also output a number of words
+that aren't mistakes; you may have to select real errors
+from the false ones.
+
+By the way, spell takes a minute to run;
+go get a cup of coffee or something while you wait.
+#create memo1
+(This comes from a federalist paper by alexander hamilton.)
+   It has been mentioned as one of the advantages to be expected
+from the cooperation of the Senate, in the business
+of appointments, that it would contribute to the
+stability of the administration.  The consent of that body
+would be necessary to displace as well as to appoint.  A
+change of the Chief Magistrate, therefore, would not occasion
+so violent or so general a revolution in the officers
+of the government as might be expected if he were the
+sole disposer of offices.  Where a man in any station had
+given satisfactory evidence of his fitness for it, a new
+President would be restrained from attempting a change
+in favor of a person more agreeable to him by the apprehension
+that a discountenance of the Senate might frustrate
+the attempt, and bring some degree of discredit
+upon himself.  Those who can best estimate the value of
+a steady administration will be most disposed to prize a
+provision which connects the official existence of public
+men with the approbation or disapprobation of that body
+which, from the greater permanency of its own composition,
+will in all probability be less subject to inconstancy
+than any other member of the government.
+   To this union of the Senate with the President, in the
+article of appointments, it has in some cases been suggested
+that it would serve to give the President an undue
+influence over the Senate, and in others that it would
+have an opposite tendency - a strong proof that neither
+suggestion is true.
+   To state the first in its proper form is to refute it.  It
+amounts to this:  the President would have an improper
+influence over the Senate, because the Senate would
+have the power of restraining him.  This is an absurdity in
+terms.  It cannot admit of a doubt that the entire power
+of appointment would enable him much more effectually
+to establish a dangerous empire over that body than a
+mere power of nomination subject to their control.
+    Let us take a view of the converse of the proposition:
+"the Senate would influence the executive."  As I have
+had occasion to remark in several other instances, the indistinctness
+of the objection forbids a precise answer.  In
+what manner is this influence to be exerted?  In relation
+to what objects?  The power of influencing a person, in
+the sense in which it is here used, must imply a power of
+conferring a benefit upon him.  How could the Senate
+confer a benefit upon the President by the manner of employing
+their right of negative upon his nominations?  If it
+be said they might sometimes gratify him by an acquiescence
+in a favorite choice, when public motives might dictate a
+different conduct, I answer that the instances in which the
+President could be personally interested in the result would
+be too few to admit of his being materially affected by the
+#create memo2
+compliances of the Senate.  Besides this, it is evident that
+the POWER which can originate the disposition of honors
+and emoluments is more likely to attract than to be attracted
+by the POWER which can merely obstruct their
+course.  If by influencing the President be want restraining
+him, this is precisely what must have been intended.
+And it has been shown that the restraint would be salutary,
+at the same time that it would not be such as to
+destroy a single advantage to be looked for from the uncontrolled
+agency of that magistrate.  The right of nomination
+would produce all the good, without the ill.
+   Upon a comparison of the plan for the appointment of
+the officers of the proposed government with that which
+is established by the constitution of this State, a decided
+preference must be given to the former.  In that plan the
+power of nomination is unequivocally vested in the executive.
+And as there would be a necessity for submitting
+each nomination to the judgment of an entire branch of
+the legislature, the circumstances attending an appointment,
+from the mode of conducting it, would naturally
+become matters of notoriety, and the public would
+be at no loss to determine what part had been performed
+by the different actors.  The blame of a bad nomination
+would fall upon the President singly and absolutely.  The
+censure of rejecting a good one would lie entirely at the
+door of the senate, aggravated by the consideration
+of their having counteracted the good intentions of the
+executive.  If an ill appointment should be made, the executive,
+for nominating, and the Senate, for approving,
+would participate, though in different degrees, in the
+opprobrium and disgrace.
+   The reverse of all this characterizes the manner of appointment
+in this State.  The council of appointment consists
+of from three to five persons, of whom the governor
+is always one.  This small body, shut up in a private
+apartment, impenetrable to the public eye, proceed to the
+execution of the trust committed to them.  It is known
+that the governor claims the right of nomination upon
+the strength of some ambiguous expressions in the Constitution;
+but it is not known to what extent, or in what
+manner he exercises it; nor upon what occasions he is
+contradicted or opposed.  The censure of a bad appointment,
+on account of the uncertainty of its author and for
+want of a determinate object, has neither poignancy nor
+duration.  And while an unbounded field for cabal and intrigue
+lies open, all idea of responsibility is lost.  The
+most that the public can know is that the governor
+claims the right of nomination; that two out of the inconsiderable
+number of four men can too often be managed
+without much difficulty; that if some of the members of a
+#create memo3
+particular council should happen to be of an uncomplying
+character, it is frequently not impossible to get rid of their
+opposition by regulating the times of meeting in such a
+manner as to render their attendance inconvenient; and
+that from whatever cause it may proceed, a great
+number of very improper appointments are from time to
+time made.  Whether a governor of this State avails himself
+of the ascendant, he must necessarily have in this
+delicate and important part of the administration to prefer
+to offices men who are best qualified for them; or
+whether he prostitutes that advantage to the advancement
+of persons whose chief merit is their implicit devotion to
+his will and to the support of a despicable and dangerous
+system of personal influence are questions which, unfortunately
+for the community, can only be the subjects
+of speculation and conjecture.
+   Every mere council of appointment, however constituted,
+will be a conclave in which cabal and intrigue will
+have their full scope.  Their number, without an unwarrantable
+increase of expense, cannot be large enough to
+preclude a facility of combination.  And as each member
+will have his friends and connections to provide for,
+the desire of mutual gratification will beget a scandalous
+bartering of votes and bargaining for places.  The private
+attachments of one man might easily be satisfied, but to
+satisfy the private attachments of a dozen, or of twenty
+men, would occasion a monopoly of all the principal employments
+of the government in a few families and
+would lead more directly to an aristocracy or an oligarchy
+than any measure that could be contrived.  If, to avoid an
+accumulation of offices, there was to be a frequent change
+in the persons who were to be a frequent change
+in the persons who were to compose the council, this
+would involve the mischiefs of a mutable administration
+in their full extent.  Such a council would also be more
+liable to executive influence than the Senate, because
+they would be fewer in number, and would act less immediately
+under the public inspection.  Such a council, in
+fine, as a substitute for the plan of the convention, would
+be productive of an increase of expense, a multiplication
+of the evils which spring from favoritism and intrigue in
+the distribution of public honors, a decrease of stability
+in the administration of the government, and a diminution
+of the security against an undue influence of the
+executive.  And yet such a council has been warmly contended
+for as an essential amendment in the proposed
+Constitution.
+   I could not with propriety conclude my observations
+on the subject of appointments without taking notice of
+a scheme for which there have appeared some, though
+#create memo4
+but a few advocates; I mean that of uniting the House of
+Representatives in the power of making them.  I shall,
+however, do little more than mention it, as I cannot
+imagine that it is likely to gain the countenance of any
+considerable part of the community.  A body so fluctuating
+and at the same time so numerous can never be
+deemed proper for the exercise of that power.  Its unfitness
+will appear manifest to all when it is recollected that
+in half a century it may consist of three or four hundred
+persons.  All the advantages of the stability, both of the
+Executive and of the Senate, would be defeated by this
+union, and infinite delays and embarrassments would be
+occasioned.  The exampled of most of the States in their
+local constitutions encourages us to reprobate the idea.
+   The only remaining powers of the executive are comprehended
+in giving information to Congress of the state
+of the Union; in recommending to their consideration
+such measures as he shall judge expedient; in convening
+them, or either branch, upon extraordinary occasions; in
+adjourning them when they cannot themselves agree upon
+the time of adjournment; in receiving ambassadors and
+other public ministers; in faithfully executing the laws;
+and in commissioning all the officers of the United States.
+   Except some cavils about the power of convening either
+house of the legislature, and that of receiving ambassadors,
+no objection has been made to this class of
+authorities; nor could they possibly admit of any.  It required,
+indeed, an insatiable avidity for censure to invent
+exceptions to the parts which have been excepted to.  In
+regard to the power of convening either house of the legislature
+I shall barely remark that in respect to the Senate,
+at least, we can readily discover a good reason for it.  As
+this body has a concurrent power with the executive in
+the article of treaties, it might often be necessary to call
+it together with a view to this object, when it would be
+unnecessary and improper to convene the House of Representatives.
+As to the reception of ambassadors, what I
+have said in a former paper will furnish a sufficient answer.
+   We have now completed a survy of the structure and
+powers of the executive department which, I have endeavored
+to show, combines, as far as republican principles
+will admit, all the requisites to energy.  The
+remaining inquiry is:  does it also combine the requisites
+to safety, in the republican sense - due dependence on
+the people, a due responsibility?  The answer to this question
+has been anticipated in the investigation of its other
+characteristics, and is satisfactorily deducible from these
+circumstances; the election of the President once in four
+years by persons immediately chosen by the people for
+that purpose, and his being at all times liable to impeachment,
+trial, dismission from office, incapacity to serve
+in any other, and to the forfeiture of life and estate by subsequent
+prosecution in the common course of law.  But
+these precautions, great as they are, are not the only
+ones which the plan of the convention has provided in
+favor of the public security.  In the only instances in which
+the abuse of the executive authority was materially to be
+feared, the chief Magistrate of the United States, would,
+by that plan, be subjected to the control of a branch of
+the legislative body.  What more can an enlightened and
+reasonable people desire?
+#copyin
+#user
+#uncopyin
+#match survy
+#log
+#next
+1.1b 10
diff --git a/usr/lib/learn/morefiles/L1.1b b/usr/lib/learn/morefiles/L1.1b
new file mode 100644 (file)
index 0000000..19d8f1c
--- /dev/null
@@ -0,0 +1,242 @@
+#print
+Now that you know what word is wrong, you still have to find
+it in one of the memo files so you can correct it.  One way
+is to use the text editor "ed", but that is rather slow.  Better
+is to use the pattern-finding program "grep", which looks through
+a set of files to find a particular word.  To find all occurrences
+of "glop" in the files tom, dick and harry, you need only type
+
+   grep 'glop' tom dick harry
+
+The first thing is the word that grep is to search for;
+any remaining names are file names, which are searched in order.
+The quotes around the word to be searched for aren't
+always necessary, but it's a good habit to use them
+anyway.  Later on we'll see some examples where they are really
+needed.
+
+Use grep to find the memo file that contains the spelling error,
+and type "answer name", where "name" is the file you decide on.
+#create memo1
+(This comes from a federalist paper by alexander hamilton.)
+   It has been mentioned as one of the advantages to be expected
+from the cooperation of the Senate, in the business
+of appointments, that it would contribute to the
+stability of the administration.  The consent of that body
+would be necessary to displace as well as to appoint.  A
+change of the Chief Magistrate, therefore, would not occasion
+so violent or so general a revolution in the officers
+of the government as might be expected if he were the
+sole disposer of offices.  Where a man in any station had
+given satisfactory evidence of his fitness for it, a new
+President would be restrained from attempting a change
+in favor of a person more agreeable to him by the apprehension
+that a discountenance of the Senate might frustrate
+the attempt, and bring some degree of discredit
+upon himself.  Those who can best estimate the value of
+a steady administration will be most disposed to prize a
+provision which connects the official existence of public
+men with the approbation or disapprobation of that body
+which, from the greater permanency of its own composition,
+will in all probability be less subject to inconstancy
+than any other member of the government.
+   To this union of the Senate with the President, in the
+article of appointments, it has in some cases been suggested
+that it would serve to give the President an undue
+influence over the Senate, and in others that it would
+have an opposite tendency - a strong proof that neither
+suggestion is true.
+   To state the first in its proper form is to refute it.  It
+amounts to this:  the President would have an improper
+influence over the Senate, because the Senate would
+have the power of restraining him.  This is an absurdity in
+terms.  It cannot admit of a doubt that the entire power
+of appointment would enable him much more effectually
+to establish a dangerous empire over that body than a
+mere power of nomination subject to their control.
+    Let us take a view of the converse of the proposition:
+"the Senate would influence the executive."  As I have
+had occasion to remark in several other instances, the indistinctness
+of the objection forbids a precise answer.  In
+what manner is this influence to be exerted?  In relation
+to what objects?  The power of influencing a person, in
+the sense in which it is here used, must imply a power of
+conferring a benefit upon him.  How could the Senate
+confer a benefit upon the President by the manner of employing
+their right of negative upon his nominations?  If it
+be said they might sometimes gratify him by an acquiescence
+in a favorite choice, when public motives might dictate a
+different conduct, I answer that the instances in which the
+President could be personally interested in the result would
+be too few to admit of his being materially affected by the
+#create memo2
+compliances of the Senate.  Besides this, it is evident that
+the POWER which can originate the disposition of honors
+and emoluments is more likely to attract than to be attracted
+by the POWER which can merely obstruct their
+course.  If by influencing the President be want restraining
+him, this is precisely what must have been intended.
+And it has been shown that the restraint would be salutary,
+at the same time that it would not be such as to
+destroy a single advantage to be looked for from the uncontrolled
+agency of that magistrate.  The right of nomination
+would produce all the good, without the ill.
+   Upon a comparison of the plan for the appointment of
+the officers of the proposed government with that which
+is established by the constitution of this State, a decided
+preference must be given to the former.  In that plan the
+power of nomination is unequivocally vested in the executive.
+And as there would be a necessity for submitting
+each nomination to the judgment of an entire branch of
+the legislature, the circumstances attending an appointment,
+from the mode of conducting it, would naturally
+become matters of notoriety, and the public would
+be at no loss to determine what part had been performed
+by the different actors.  The blame of a bad nomination
+would fall upon the President singly and absolutely.  The
+censure of rejecting a good one would lie entirely at the
+door of the senate, aggravated by the consideration
+of their having counteracted the good intentions of the
+executive.  If an ill appointment should be made, the executive,
+for nominating, and the Senate, for approving,
+would participate, though in different degrees, in the
+opprobrium and disgrace.
+   The reverse of all this characterizes the manner of appointment
+in this State.  The council of appointment consists
+of from three to five persons, of whom the governor
+is always one.  This small body, shut up in a private
+apartment, impenetrable to the public eye, proceed to the
+execution of the trust committed to them.  It is known
+that the governor claims the right of nomination upon
+the strength of some ambiguous expressions in the Constitution;
+but it is not known to what extent, or in what
+manner he exercises it; nor upon what occasions he is
+contradicted or opposed.  The censure of a bad appointment,
+on account of the uncertainty of its author and for
+want of a determinate object, has neither poignancy nor
+duration.  And while an unbounded field for cabal and intrigue
+lies open, all idea of responsibility is lost.  The
+most that the public can know is that the governor
+claims the right of nomination; that two out of the inconsiderable
+number of four men can too often be managed
+without much difficulty; that if some of the members of a
+#create memo3
+particular council should happen to be of an uncomplying
+character, it is frequently not impossible to get rid of their
+opposition by regulating the times of meeting in such a
+manner as to render their attendance inconvenient; and
+that from whatever cause it may proceed, a great
+number of very improper appointments are from time to
+time made.  Whether a governor of this State avails himself
+of the ascendant, he must necessarily have in this
+delicate and important part of the administration to prefer
+to offices men who are best qualified for them; or
+whether he prostitutes that advantage to the advancement
+of persons whose chief merit is their implicit devotion to
+his will and to the support of a despicable and dangerous
+system of personal influence are questions which, unfortunately
+for the community, can only be the subjects
+of speculation and conjecture.
+   Every mere council of appointment, however constituted,
+will be a conclave in which cabal and intrigue will
+have their full scope.  Their number, without an unwarrantable
+increase of expense, cannot be large enough to
+preclude a facility of combination.  And as each member
+will have his friends and connections to provide for,
+the desire of mutual gratification will beget a scandalous
+bartering of votes and bargaining for places.  The private
+attachments of one man might easily be satisfied, but to
+satisfy the private attachments of a dozen, or of twenty
+men, would occasion a monopoly of all the principal employments
+of the government in a few families and
+would lead more directly to an aristocracy or an oligarchy
+than any measure that could be contrived.  If, to avoid an
+accumulation of offices, there was to be a frequent change
+in the persons who were to be a frequent change
+in the persons who were to compose the council, this
+would involve the mischiefs of a mutable administration
+in their full extent.  Such a council would also be more
+liable to executive influence than the Senate, because
+they would be fewer in number, and would act less immediately
+under the public inspection.  Such a council, in
+fine, as a substitute for the plan of the convention, would
+be productive of an increase of expense, a multiplication
+of the evils which spring from favoritism and intrigue in
+the distribution of public honors, a decrease of stability
+in the administration of the government, and a diminution
+of the security against an undue influence of the
+executive.  And yet such a council has been warmly contended
+for as an essential amendment in the proposed
+Constitution.
+   I could not with propriety conclude my observations
+on the subject of appointments without taking notice of
+a scheme for which there have appeared some, though
+#create memo4
+but a few advocates; I mean that of uniting the House of
+Representatives in the power of making them.  I shall,
+however, do little more than mention it, as I cannot
+imagine that it is likely to gain the countenance of any
+considerable part of the community.  A body so fluctuating
+and at the same time so numerous can never be
+deemed proper for the exercise of that power.  Its unfitness
+will appear manifest to all when it is recollected that
+in half a century it may consist of three or four hundred
+persons.  All the advantages of the stability, both of the
+Executive and of the Senate, would be defeated by this
+union, and infinite delays and embarrassments would be
+occasioned.  The exampled of most of the States in their
+local constitutions encourages us to reprobate the idea.
+   The only remaining powers of the executive are comprehended
+in giving information to Congress of the state
+of the Union; in recommending to their consideration
+such measures as he shall judge expedient; in convening
+them, or either branch, upon extraordinary occasions; in
+adjourning them when they cannot themselves agree upon
+the time of adjournment; in receiving ambassadors and
+other public ministers; in faithfully executing the laws;
+and in commissioning all the officers of the United States.
+   Except some cavils about the power of convening either
+house of the legislature, and that of receiving ambassadors,
+no objection has been made to this class of
+authorities; nor could they possibly admit of any.  It required,
+indeed, an insatiable avidity for censure to invent
+exceptions to the parts which have been excepted to.  In
+regard to the power of convening either house of the legislature
+I shall barely remark that in respect to the Senate,
+at least, we can readily discover a good reason for it.  As
+this body has a concurrent power with the executive in
+the article of treaties, it might often be necessary to call
+it together with a view to this object, when it would be
+unnecessary and improper to convene the House of Representatives.
+As to the reception of ambassadors, what I
+have said in a former paper will furnish a sufficient answer.
+   We have now completed a survy of the structure and
+powers of the executive department which, I have endeavored
+to show, combines, as far as republican principles
+will admit, all the requisites to energy.  The
+remaining inquiry is:  does it also combine the requisites
+to safety, in the republican sense - due dependence on
+the people, a due responsibility?  The answer to this question
+has been anticipated in the investigation of its other
+characteristics, and is satisfactorily deducible from these
+circumstances; the election of the President once in four
+years by persons immediately chosen by the people for
+that purpose, and his being at all times liable to impeachment,
+trial, dismission from office, incapacity to serve
+in any other, and to the forfeiture of life and estate by subsequent
+prosecution in the common course of law.  But
+these precautions, great as they are, are not the only
+ones which the plan of the convention has provided in
+favor of the public security.  In the only instances in which
+the abuse of the executive authority was materially to be
+feared, the chief Magistrate of the United States, would,
+by that plan, be subjected to the control of a branch of
+the legislative body.  What more can an enlightened and
+reasonable people desire?
+#copyin
+#user
+#uncopyin
+#match memo4
+#log
+#next
+1.1c 10
diff --git a/usr/lib/learn/morefiles/L1.1c b/usr/lib/learn/morefiles/L1.1c
new file mode 100644 (file)
index 0000000..377c8fe
--- /dev/null
@@ -0,0 +1,18 @@
+#print
+In this directory is a file named for an unsuccessful king.
+Read it and do what it tells you.
+#create Elizabeth1
+1. She was not a king
+2. She was generally successful
+#create George3
+Does the file George3 contain a backspace character
+any\b where in it?  Figure it out with grep, then type
+"answer N", where N is the line number where you found it.
+Type "answer 0" if there is no backspace.
+#copyin
+#user
+#uncopyin
+#match 2
+#log
+#next
+1.1d 10
diff --git a/usr/lib/learn/morefiles/L1.1d b/usr/lib/learn/morefiles/L1.1d
new file mode 100644 (file)
index 0000000..ee38cc4
--- /dev/null
@@ -0,0 +1,76 @@
+#print
+Print all lines in the file "memo" that contain
+a question mark "?".  Note that since the question mark
+is an abbreviation character (as in "ls ?"), you
+have to make sure that the command interpreter doesn't
+try to interpret it, but instead passes it to "grep"
+as a literal question mark. 
+
+The way to do this is simply to enclose it in quotes,
+as in
+  grep '?' files...
+
+Try listing all the lines with question marks, then type "ready".
+#create memo
+(This comes from a federalist paper by alexander hamilton.)
+   It has been mentioned as one of the advantages to be expected
+from the cooperation of the Senate, in the business
+of appointments, that it would contribute to the
+stability of the administration.  The consent of that body
+would be necessary to displace as well as to appoint.  A
+change of the Chief Magistrate, therefore, would not occasion
+so violent or so general a revolution in the officers
+of the government as might be expected if he were the
+sole disposer of offices.  Where a man in any station had
+given satisfactory evidence of his fitness for it, a new
+President would be restrained from attempting a change
+in favor of a person more agreeable to him by the apprehension
+that a discountenance of the Senate might frustrate
+the attempt, and bring some degree of discredit
+upon himself.  Those who can best estimate the value of
+a steady administration will be most disposed to prize a
+provision which connects the official existence of public
+men with the approbation or disapprobation of that body
+which, from the greater permanency of its own composition,
+will in all probability be less subject to inconstancy
+than any other member of the government.
+   To this union of the Senate with the President, in the
+article of appointments, it has in some cases been suggested
+that it would serve to give the President an undue
+influence over the Senate, and in others that it would
+have an opposite tendency - a strong proof that neither
+suggestion is true.
+   To state the first in its proper form is to refute it.  It
+amounts to this:  the President would have an improper
+influence over the Senate, because the Senate would
+have the power of restraining him.  This is an absurdity in
+terms.  It cannot admit of a doubt that the entire power
+of appointment would enable him much more effectually
+to establish a dangerous empire over that body than a
+mere power of nomination subject to their control.
+    Let us take a view of the converse of the proposition:
+"the Senate would influence the executive."  As I have
+had occasion to remark in several other instances, the indistinctness
+of the objection forbids a precise answer.  In
+what manner is this influence to be exerted?  In relation
+to what objects?  The power of influencing a person, in
+the sense in which it is here used, must imply a power of
+conferring a benefit upon him.  How could the Senate
+confer a benefit upon the President by the manner of employing
+their right of negative upon his nominations?  If it
+be said they might sometimes gratify him by an acquiescence
+in a favorite choice, when public motives might dictate a
+different conduct, I answer that the instances in which the
+President could be personally interested in the result would
+be too few to admit of his being materially affected by the
+#create 1
+#create x
+#copyout
+#user
+#uncopyout
+tail -3 .ocopy >X1
+grep '?' memo >X2
+#cmp X1 X2
+#log
+#next
+2.1a 10
diff --git a/usr/lib/learn/morefiles/L2.1a b/usr/lib/learn/morefiles/L2.1a
new file mode 100644 (file)
index 0000000..5160bdf
--- /dev/null
@@ -0,0 +1,30 @@
+#print
+Most of the programs we have studied so far produce their
+output on the terminal -- examples are "ls", "spell", "grep",
+"date", "who", and so on.  (Of course, some do not, like
+"mv", "cp", and "rm".)  In any case, it is sometimes useful
+to be able to capture the output of a program in a file,
+so it can be used in some later processing.  This is very easy.
+For example, to get the current date and time in a file called
+"now", you need only type
+
+   date >now
+
+The symbol ">" tells the command interpreter that output
+is to go into the file whose name follows.  If the file already
+exists, its old contents will be clobbered, so use discretion.
+
+Your task is to make a list of the files in this directory
+in the file "foo".
+When you have finished, type "ready".
+#create X1
+#create junk1
+asdfadfaf
+#create junk2
+qerqerqrq
+#user
+ls >X1
+#cmp X1 foo
+#log
+#next
+2.1b 10
diff --git a/usr/lib/learn/morefiles/L2.1b b/usr/lib/learn/morefiles/L2.1b
new file mode 100644 (file)
index 0000000..5689e95
--- /dev/null
@@ -0,0 +1,18 @@
+#print
+Now make a list of the files in this directory whose
+names begin with "t" in the file "foo".
+Type "ready" when you are done.
+#create X1
+#create foo
+#create this
+#create Ref
+that
+theother
+this
+#create that
+#create theother
+#user
+#cmp foo Ref
+#log
+#next
+2.1c 10
diff --git a/usr/lib/learn/morefiles/L2.1c b/usr/lib/learn/morefiles/L2.1c
new file mode 100644 (file)
index 0000000..d1ff869
--- /dev/null
@@ -0,0 +1,17 @@
+#print
+This time you have to get a list of the files whose names begin
+with "memo", but sorted in order of last change, most recent first,
+as produced by "ls -t".  Get the list in file "gorp",
+then type "ready".
+#create memo1
+first line
+#create memo3
+third line
+#create memo2
+second line
+#user
+ls -t memo* >X1
+#cmp X1 gorp
+#log
+#next
+2.1d 10
diff --git a/usr/lib/learn/morefiles/L2.1d b/usr/lib/learn/morefiles/L2.1d
new file mode 100644 (file)
index 0000000..97ef391
--- /dev/null
@@ -0,0 +1,10 @@
+#print
+If you type "ls >list", does the name "list" appear in the file
+called "list"?  Figure it out, then type yes or no.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+2.1e 10
diff --git a/usr/lib/learn/morefiles/L2.1e b/usr/lib/learn/morefiles/L2.1e
new file mode 100644 (file)
index 0000000..6eef846
--- /dev/null
@@ -0,0 +1,25 @@
+#print
+If you make a mistake and type something like
+
+   xxxxx >precious
+
+where "xxxxx" is not\b\b\b___ the name of a legal UNIX
+command, what happens to the file "precious"?
+
+In this directory, there are several precious files.
+Experiment to see what happens.  When you have decided,
+type "answer harmless" if nothing happens to the files,
+or "answer disaster" if the file is clobbered.
+#create precious
+I am precious.
+#create precious1
+So am I.
+#create precious2
+Me too.
+#copyin
+#user
+#uncopyin
+#match disaster
+#log
+#next
+2.1f 10
diff --git a/usr/lib/learn/morefiles/L2.1f b/usr/lib/learn/morefiles/L2.1f
new file mode 100644 (file)
index 0000000..b7c7c33
--- /dev/null
@@ -0,0 +1,14 @@
+#print
+Obtain a long listing (with "ls -l") of all files in this directory
+whose names begin with capital letters, in a file
+called "names". 
+Type "ready" when you're done.
+#create STUFF
+#
+ls -l [A-Z]* >x1
+#user
+#cmp x1 names
+#log
+#next
+3.1a 10
+3.2a 5
diff --git a/usr/lib/learn/morefiles/L3.1a b/usr/lib/learn/morefiles/L3.1a
new file mode 100644 (file)
index 0000000..a2f8bac
--- /dev/null
@@ -0,0 +1,36 @@
+#print
+The notation ">" can be used by most programs to capture
+output on a file.  For example, 
+
+   cat henry >james
+
+makes a copy of "henry" in the file "james"; in fact this is
+essentially identical to
+
+   cp henry james
+
+"cat" is a bit more flexible, though, since you can concatenate
+several files onto one output.  Remember that
+
+   cat tom dick harry
+
+copies all three files onto the terminal?
+In this directory is a file named "john".
+Make a file called "mary" that contains ___\b\b\btwo copies of "john".
+Type "ready" when you're done.
+#create john
+Now is the time for all good
+men to come to the aid of their
+party
+#create X1
+Now is the time for all good
+men to come to the aid of their
+party
+Now is the time for all good
+men to come to the aid of their
+party
+#user
+#cmp X1 mary
+#log
+#next
+3.1b 10
diff --git a/usr/lib/learn/morefiles/L3.1b b/usr/lib/learn/morefiles/L3.1b
new file mode 100644 (file)
index 0000000..e48cc81
--- /dev/null
@@ -0,0 +1,40 @@
+#print
+How many spelling mistakes are there in the file "Ref",
+according to "spell"?
+Type "answer N", where N is the number you decide on.
+#create Ref
+Bianchi
+Blue
+Feldman
+McIlroy
+Roome
+Rosin
+Rosler
+Aho
+Bourne
+Dvorak
+Haley
+Harris
+Holt
+Johnson
+Mashey
+Mitze
+Muha
+Nelson
+Pinson
+Plauger
+Spivack
+Thompson
+Weinberger
+Lesk
+Ossanna
+#
+spell Ref | %s/../lcount >X2 &
+#copyin
+#user
+#uncopyin
+tail -1 .copy >X1
+#cmp X2 X1
+#log
+#next
+3.1c 10
diff --git a/usr/lib/learn/morefiles/L3.1c b/usr/lib/learn/morefiles/L3.1c
new file mode 100644 (file)
index 0000000..31f5635
--- /dev/null
@@ -0,0 +1,42 @@
+#print
+So far the only printing program we have seen
+is "cat", which just copies one or more files
+onto the terminal (or perhaps onto a file when used
+with ">").
+The next step up is the program "pr", which
+prints files so that each file begins on a
+new page, and the top of each page contains the date
+and time the file was changed, and a running page number.
+Use a single "pr" to print the two files in this directory
+whose names begin with "fed". 
+What page number is printed on the last page? Type "answer N"
+where N is the page number.
+#create fed1
+   After an unequivocal experience of the inefficacy of
+the subsisting federal government, you are called upon to
+deliberate on a new Constitution for the United States
+of America.  The subject speaks its own importance;
+comprehending in its consequences nothing less than the
+existence of the union, the safety and welfare of the
+parts of which it is composed, the fate of an empire in many
+respects the most interesting in the world.
+#create fed2
+It has been frequently remarked that it seems to have been
+reserved to the people of this country, by their conduct and
+example, to decide the important question, whether
+societies of men are really capable or not of establishing
+good government from reflection and choice, or whether
+they are forever destined to depend for their political
+constitutions on accident and force.  If there be any truth
+in the remark, the crisis at which we are arrived may with
+propriety be regarded as the era in which that
+decision is to be made; and a wrong election of the part
+we shall act may, in this view, deserve to be considered as
+the general misfortune of mankind.
+#copyin
+#user
+#uncopyin
+#match 1
+#log
+#next
+3.1d
diff --git a/usr/lib/learn/morefiles/L3.1d b/usr/lib/learn/morefiles/L3.1d
new file mode 100644 (file)
index 0000000..c7ecd1b
--- /dev/null
@@ -0,0 +1,125 @@
+#print
+The pr command has a number of other capabilities besides simple
+printing of files.  Probably the most useful is that it can do
+multi-column printing.  This is controlled by an optional
+argument:
+  pr -3 filenames
+will print in 3-column format, and 
+  pr -5 filenames
+prints in five columns.  You can use any number in place of 3 and 5,
+although as you get more columns they become narrower
+so things will fit.
+Notice that the optional argument comes ______\b\b\b\b\b\bbefore the files names.
+
+In this directory there is a list of words.  Find the list, print
+it in two columns, and find out what word appears at the top
+of the second column.  Type "answer WORD", where WORD
+is the word you decide on.
+#create wordlist
+a
+aardvark
+aardwolf
+Aaron
+Aaronic
+Ab
+aba
+abaca
+abaci
+aback
+abacus
+abacuses
+abaft
+abalone
+abandon
+abandoned
+abandoner
+abandonment
+abase
+abasement
+abash
+abashment
+abate
+abatement
+abater
+abatis
+abatises
+abattoir
+abaxial
+abbacy
+Abbasid
+abbatial
+abbe\b'
+abbess
+Abbevillian
+abbey
+abbot
+abbreviate
+abbreviation
+abbreviator
+Abby
+Abc
+Abcs
+Abc's
+abdicable
+abdicate
+abdication
+abdicator
+abdomen
+abdominal
+abdominally
+abdominous
+abduce
+abducent
+abduct
+abduction
+abductor
+abeam
+abecedarian
+abed
+Abel
+abele
+abelmosk
+aberrance
+aberrancy
+aberrant
+aberrantly
+aberration
+aberrational
+abet
+abetment
+abetted
+abetter
+abetting
+abettor
+abeyance
+abeyant
+abhominable
+abhor
+abhorred
+abhorrence
+abhorrent
+abhorrently
+abhorrer
+abhorring
+Abib
+abidance
+abide
+abided
+abider
+abiding
+Abigail
+abigail
+ability
+abiogeneses
+abiogenesis
+abiogenetic
+abiogenetical
+abiogenetically
+abiogenist
+#copyin
+#user
+#uncopyin
+#match abductor
+#log
+#next
+3.1e 10
diff --git a/usr/lib/learn/morefiles/L3.1e b/usr/lib/learn/morefiles/L3.1e
new file mode 100644 (file)
index 0000000..36f55d5
--- /dev/null
@@ -0,0 +1,116 @@
+#print
+Of course you can collect the output from "pr" in a file,
+just as you can with "cat".  For practice, there are several
+files in this directory whose names begin with "word".
+Prepare a list (with "pr", one file per page)
+of these files in the file "neat".
+Type "ready" when you have finished.
+#create word1
+a
+aard-vark
+aard-wolf
+Aar-on
+Aa-ron-ic
+Ab
+aba
+ab-a-ca
+aba-ci
+aback
+aba-cus
+aba-cus-es
+abaft
+ab-a-lo-ne
+aban-don
+aban-doned
+aban-don-er
+aban-don-ment
+abase
+abase-ment
+abash
+abash-ment
+abate
+abate-ment
+abat-er
+ab-a-tis
+ab-a-tis-es
+ab-at-toir
+ab-ax-i-al
+ab-ba-cy
+#create word2
+Ab-bas-id
+ab-ba-tial
+ab-be\b'
+ab-bess
+Abbe-vil-li-an
+ab-bey
+ab-bot
+ab-bre-vi-ate
+ab-bre-vi-a-tion
+ab-bre-vi-a-tor
+Abby
+Abc
+Abcs
+Abc's
+ab-di-ca-ble
+ab-di-cate
+ab-di-ca-tion
+ab-di-ca-tor
+ab-do-men
+ab-dom-i-nal
+ab-dom-i-nal-ly
+ab-dom-i-nous
+ab-duce
+ab-du-cent
+ab-duct
+ab-duc-tion
+ab-duc-tor
+abeam
+abe-ce-dar-i-an
+abed
+#create word3
+Abel
+abele
+abel-mosk
+ab-er-rance
+ab-er-ran-cy
+ab-er-rant
+ab-er-rant-ly
+ab-er-ra-tion
+ab-er-ra-tion-al
+abet
+abet-ment
+abet-ted
+abet-ter
+abet-ting
+abet-tor
+abey-ance
+abey-ant
+abhominable
+ab-hor
+ab-horred
+ab-hor-rence
+ab-hor-rent
+ab-hor-rent-ly
+ab-hor-rer
+ab-hor-ring
+Abib
+abid-ance
+abide
+abid-ed
+abid-er
+abid-ing
+Abigail
+ab-i-gail
+abil-i-ty
+abio-gen-e-ses
+abio-gen-e-sis
+abio-ge-net-ic
+abio-ge-net-i-cal
+abio-ge-net-i-cal-ly
+abi-og-e-nist
+#user
+pr word* >X1
+#cmp X1 neat
+#log
+#next
+3.1f 10
diff --git a/usr/lib/learn/morefiles/L3.1f b/usr/lib/learn/morefiles/L3.1f
new file mode 100644 (file)
index 0000000..ebc8cec
--- /dev/null
@@ -0,0 +1,167 @@
+#print
+This exercise combines several things you've learned already.
+In this directory is a file containing a list of words.
+Collect all of the words that contain "ly" into a file
+called "lywords".  (What program does that?)
+Then use "pr" to make another file called "neatly"
+that contains the list of words printed in one column.
+Type "ready" when you have made both files.
+#create words
+ampersand
+amphetamine
+amphiarthrosis
+amphibia
+amphibian
+amphibiotic
+amphibious
+amphibiously
+amphibiousness
+amphibole
+amphibolite
+amphibolitic
+amphibology
+amphibrach
+amphibrachic
+amphictyonic
+amphictyony
+amphidiploid
+amphidiploidy
+amphimacer
+amphimictic
+amphimictically
+amphimixis
+Amphion
+amphioxus
+amphiploid
+amphiploidy
+amphipod
+amphiprostyle
+amphiprostyle
+amphisbaena
+amphisbaenic
+amphistylar
+amphitheater
+amphitheatric
+amphitheatrical
+amphitheatrically
+Amphitrite
+amphitropous
+Amphitryon
+amphora
+amphorae
+amphoras
+amphoteric
+ample
+ampleness
+amplexicaul
+amplidyne
+amplification
+amplifier
+amplify
+amplitude
+amply
+ampoule
+ampul
+ampulla
+ampullae
+ampullar
+amputate
+amputation
+amputator
+amputee
+amtrac
+amtrack
+amuck
+amulet
+amuse
+amusement
+amuser
+amusing
+amusingly
+amusive
+Amy
+amygdalin
+amygdaloid
+amygdaloidal
+amyl
+amylaceous
+amylase
+amyloid
+amyloidal
+amylolysis
+amylolytic
+amylopsin
+amylose
+amylum
+amyotonia
+an
+an'
+ana
+an'a
+anabaptism
+Anabaptist
+anabases
+anabasis
+anabatic
+anabiosis
+anabiotic
+anabolic
+anabolism
+anabolite
+anabolitic
+anachronic
+anachronism
+anachronistic
+anachronistically
+anachronous
+anachronously
+anaclitic
+anacolutha
+anacoluthic
+anacoluthically
+anacoluthon
+anacoluthons
+anaconda
+Anacreontic
+anacreontic
+anacrusis
+anaculture
+anadem
+anadiplosis
+anadromous
+anaemia
+anaerobe
+anaerobic
+anaerobically
+anaesthesia
+anaesthetic
+anaglyph
+anaglyphic
+anagoge
+anagogic
+anagogical
+anagogically
+anagogy
+anagram
+anagrammatic
+anagrammatical
+anagrammatically
+anagrammatize
+anagrammed
+anagramming
+anal
+analcime
+analcite
+analects
+analemma
+analeptic
+analgesia
+analgesic
+analgetic
+#user
+grep ly words >X1
+pr lywords >X2
+cmp -s X1 lywords && cmp -s X2 neatly
+#log
+#next
+3.1a 10
diff --git a/usr/lib/learn/morefiles/L3.2a b/usr/lib/learn/morefiles/L3.2a
new file mode 100644 (file)
index 0000000..6c1a474
--- /dev/null
@@ -0,0 +1,25 @@
+#print
+Most of the examples we have been doing so far have been
+exercises in using "ls ... >file". 
+But ___\b\b\bany program that normally produces its output on your terminal
+can be made to put that same output into a file instead
+with ">". 
+For example, "cat" simply copies one or more files onto the
+terminal normally, so by using ">", you can get the same 
+information on a file instead. 
+In this directory there are two files whose names
+begin with "r".  Copy them onto a new file called 
+"combine". 
+Type "ready" when you're done.
+#create ref
+Now is the tuime
+#create ref1
+for all good men
+#create X1
+Now is the tuime
+for all good men
+#user
+#cmp X1 combine
+#log
+#next
+3.1a 10
diff --git a/usr/lib/learn/morefiles/L4.1a b/usr/lib/learn/morefiles/L4.1a
new file mode 100644 (file)
index 0000000..6cd5ba5
--- /dev/null
@@ -0,0 +1,25 @@
+#print
+You have already had some practice in using ">" to capture
+the output of a program.  In much the same way, it
+is possible to arrange for a program to take its input not
+from the terminal but from a file.
+Most UNIX programs are written so that they will read either
+the terminal or from a list of filenames.
+To have a program read from a file instead of the terminal,
+use the "<", like this:
+  pr <file
+As a simple experiment, determine if
+  pr <file
+is absolutely identical to
+  pr file
+Answer yes or no.
+#create junk
+you can use this file to play with.
+#copyin
+#user
+#uncopyin
+#match no
+#log
+#next
+4.1b 10
+4.2a 5
diff --git a/usr/lib/learn/morefiles/L4.1b b/usr/lib/learn/morefiles/L4.1b
new file mode 100644 (file)
index 0000000..26a8076
--- /dev/null
@@ -0,0 +1,38 @@
+#print
+Is there a difference between
+  grep the memo[12]
+and
+  cat memo[12] >temp
+  grep the <temp
+Answer yes or no.
+
+If you want to experiment, there are two files named "memo1" and
+"memo2" in this directory.
+#create memo1
+   There is not room enough in the leaves to hold all the food
+that plants make.  Much of the food has to be stored in other parts
+of the plant.
+   We eat the parts of plants where the most food is stored.  The
+carrot plant stores food in its roots.  We eat the roots of carrots.
+The celery plant stores food in its leaf stalks.  They are the parts
+we eat.  Many kinds of plants store food in their fruits.  We eat
+the fruits of these plants to get the stored food in them.
+   Some kinds of plants have ways of protecting their stored food.
+#create memo2
+   Goldfish grow very slowly in an aquarium.  They grow so slowly
+that it is hard to know that they grow at all.  If they are kept
+outdoors in a pool, they grow much faster and they grow much larger,
+too.  Sometimes they grow to be more than a foot long in an outdoor
+pool.
+   When goldfish are kept in an aquarium they often do not live very
+long.  Sometimes they die in a few weeks, but they may live as long
+as ten years.  Some people have kept goldfish in an outdoor pool for
+thirty years.
+   There are many different colors of goldfish.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+4.1c 10
diff --git a/usr/lib/learn/morefiles/L4.1c b/usr/lib/learn/morefiles/L4.1c
new file mode 100644 (file)
index 0000000..d2c7e08
--- /dev/null
@@ -0,0 +1,42 @@
+#print
+There are two files called "story1" and "story2" in
+this directory.  Collect the outputs of
+  grep the story[12]
+and
+  cat story[12] >temp
+  grep the <temp
+on two files called "the1" and "the2".  Then
+run "diff" on "the1" and "the2", and
+collect the differences on a file called "difference".
+Type "ready" when you have finished all of this.
+#create story1
+   Some animals have six feet.  These animals are insects.
+Insects are little animals.  Insects creep with their six feet.
+Many insects have wings, too.
+   Ants are insects.  Many ants live together.  They live in ant
+hills.  Many ants travel together.  Ants creep on their six feet.
+Ants creep fast.  They creep around on the ground.  They creep in
+and out of ant hills.  They creep up and down plants.  They creep
+into houses.
+   Some ants have wings.  They do not have wings all the time.
+They grow wings to fly away.  They fly away to find new homes.
+Then they lose their wings.
+#create story2
+   "Will there be baby robins soon?" asked Bill.  "We will see,"
+said Miss Fox.  Joan said, "we have looked and looked.  I think
+there will be no baby birds."  Barbara said, "It takes many days.
+The eggs need to be warm all the time.  The mother bird warms them."
+Bill said, "The father bird helps, too."  Joan said, "I guess I did
+not think.  There may be baby birds after all."
+   One day Carl called, "Come and look.  I see four baby birds in
+the nest."  All the children ran to look.  "But they are not pretty,"  
+Joan said.  Bill said, "Joan is right."
+#user
+cat story[12] >X1
+grep the <X1 >X2
+grep the story[12] >X1
+diff X1 X2 >X3
+#cmp X3 difference
+#log
+#next
+4.1d 10
diff --git a/usr/lib/learn/morefiles/L4.1d b/usr/lib/learn/morefiles/L4.1d
new file mode 100644 (file)
index 0000000..8b3cae7
--- /dev/null
@@ -0,0 +1,130 @@
+#print
+Unix has several rather simple programs that are useful
+in their own right and as building blocks in more complicated
+operations.   One of the most frequently used is "wc",
+which counts lines, words, and characters in files.
+If you say
+  wc file
+or 
+  wc <file
+wc will print three numbers: the number of
+lines, words and characters in the file.
+(Some systems have an obsolete version of "wc" that
+doesn't count the characters.)
+If there is more than one file, as in
+  wc file1 file2 file3 file4
+then wc will list the counts for each file separately,
+and the total.
+
+What is the total number of words
+in the two files whose names begin with "memo"?
+Type "answer N", where N is the number of words.
+#create memo1
+   It has been mentioned as one of the advantages to be expected
+from the cooperation of the Senate, in the business
+of appointments, that it would contribute to the
+stability of the administration.  The consent of that body
+would be necessary to displace as well as to appoint.  A
+change of the Chief Magistrate, therefore, would not occasion
+so violent or so general a revolution in the officers
+of the government as might be expected if he were the
+sole disposer of offices.  Where a man in any station had
+given satisfactory evidence of his fitness for it, a new
+President would be restrained from attempting a change
+in favor of a person more agreeable to him by the apprehension
+that a discountenance of the Senate might frustrate
+the attempt, and bring some degree of discredit
+upon himself.  Those who can best estimate the value of
+a steady administration will be most disposed to prize a
+provision which connects the official existence of public
+men with the approbation or disapprobation of that body
+which, from the greater permanency of its own composition,
+will in all probability be less subject to inconstancy
+than any other member of the government.
+   To this union of the Senate with the President, in the
+article of appointments, it has in some cases been suggested
+that it would serve to give the President an undue
+influence over the Senate, and in others that it would
+have an opposite tendency - a strong proof that neither
+suggestion is true.
+   To state the first in its proper form is to refute it.  It
+amounts to this:  the President would have an improper
+influence over the Senate, because the Senate would
+have the power of restraining him.  This is an absurdity in
+terms.  It cannot admit of a doubt that the entire power
+of appointment would enable him much more effectually
+to establish a dangerous empire over that body than a
+mere power of nomination subject to their control.
+    Let us take a view of the converse of the proposition:
+"the Senate would influence the executive."  As I have
+had occasion to remark in several other instances, the indistinctness
+of the objection forbids a precise answer.  In
+what manner is this influence to be exerted?  In relation
+to what objects?  The power of influencing a person, in
+the sense in which it is here used, must imply a power of
+conferring a benefit upon him.  How could the Senate
+confer a benefit upon the President by the manner of employing
+their right of negative upon his nominations?  If it
+be said they might sometimes gratify him by an acquiescence
+in a favorite choice, when public motives might dictate a
+different conduct, I answer that the instances in which the
+President could be personally interested in the result would
+be too few to admit of his being materially affected by the
+#create memo2
+compliances of the Senate.  Besides this, it is evident that
+the POWER which can originate the disposition of honors
+and emoluments is more likely to attract than to be attracted
+by the POWER which can merely obstruct their
+course.  If by influencing the President be want restraining
+him, this is precisely what must have been intended.
+And it has been shown that the restraint would be salutary,
+at the same time that it would not be such as to
+destroy a single advantage to be looked for from the uncontrolled
+agency of that magistrate.  The right of nomination
+would produce all the good, without the ill.
+   Upon a comparison of the plan for the appointment of
+the officers of the proposed government with that which
+is established by the constitution of this State, a decided
+preference must be given to the former.  In that plan the
+power of nomination is unequivocally vested in the executive.
+And as there would be a necessity for submitting
+each nomination to the judgment of an entire branch of
+the legislature, the circumstances attending an appointment,
+from the mode of conducting it, would naturally
+become matters of notoriety, and the public would
+be at no loss to determine what part had been performed
+by the different actors.  The blame of a bad nomination
+would fall upon the President singly and absolutely.  The
+censure of rejecting a good one would lie entirely at the
+door of the senate, aggravated by the consideration
+of their having counteracted the good intentions of the
+executive.  If an ill appointment should be made, the executive,
+for nominating, and the Senate, for approving,
+would participate, though in different degrees, in the
+opprobrium and disgrace.
+   The reverse of all this characterizes the manner of appointment
+in this State.  The council of appointment consists
+of from three to five persons, of whom the governor
+is always one.  This small body, shut up in a private
+apartment, impenetrable to the public eye, proceed to the
+execution of the trust committed to them.  It is known
+that the governor claims the right of nomination upon
+the strength of some ambiguous expressions in the Constitution;
+but it is not known to what extent, or in what
+manner he exercises it; nor upon what occasions he is
+contradicted or opposed.  The censure of a bad appointment,
+on account of the uncertainty of its author and for
+want of a determinate object, has neither poignancy nor
+duration.  And while an unbounded field for cabal and intrigue
+lies open, all idea of responsibility is lost.  The
+most that the public can know is that the governor
+claims the right of nomination; that two out of the inconsiderable
+number of four men can too often be managed
+without much difficulty; that if some of the members of a
+#copyin
+#user
+#uncopyin
+#match 949
+#log
+#next
+4.1e 10
diff --git a/usr/lib/learn/morefiles/L4.1e b/usr/lib/learn/morefiles/L4.1e
new file mode 100644 (file)
index 0000000..8b794ea
--- /dev/null
@@ -0,0 +1,34 @@
+#print
+How many lines total are there in the two files called
+"chema" and "chemb" in this directory?  Use "wc".
+Type "answer N", where N is the total number of lines.
+#create chema
+   The baker said, "Now I shall put just the right amounts of water and
+yeast with the flour that is in the mixer.  Flour, water, and yeast
+together make the sponge.  Making sponge is the first step in making
+bread."
+   The baker closed the mixer.  Inside the machine, the flour and
+yeast and water went around and around until they were well mixed.
+Then the baker opened the mixer and the sponge dropped into a greased
+tub called a trough.
+   The baker pushed the trough into a warm room to let the sponge 
+rise.  It looked like dough, but it did not as yet have everything
+in it.
+#create chemb
+   Wash the blackboard.  Watch it dry.  The water goes into the air.
+When water goes into the air it evaporates.
+   Tie a damp cloth to one end of a stick.  Tie a bottle to the
+other end.  Put water in the bottle until the stick is level.  Watch
+the stick for a few minutes.  It does not stay level.
+   Water goes into the air when it evaporates.  It changes into
+water vapor.  You cannot see water vapor, but it is in the air all
+around you.
+   Cut a hole in the bottom of a cardboard box.  Hold the box
+against a cold window and blow into the hole.
+#copyin
+#user
+#uncopyin
+#match 21
+#log
+#next
+4.1f 10
diff --git a/usr/lib/learn/morefiles/L4.1f b/usr/lib/learn/morefiles/L4.1f
new file mode 100644 (file)
index 0000000..73ecd92
--- /dev/null
@@ -0,0 +1,48 @@
+#print
+Another useful command is "tail", which will print the last
+10 lines of a file.  This is handy when you want to see how 
+far something got before it stopped, or what the last thing
+in a file is.  To use "tail", all you need to say is
+  tail file
+What is the first word on the next to last line of the file
+called "Ref" in this directory.
+Type "answer WORD", where WORD is the word you found.
+#create Ref
+   Now Abraham Lincoln was master of the White House.  But he was
+President of only part of the United States.  For the Southern
+States has taken down the Star-Spangled Banner and raised the flag
+of the Confederacy in its stead.  Sad and silent, Lincoln gazed
+through his spyglass at the Confederate flag that fluttered in the
+wind on the other side of the Potomac River in Virginia.  He pondered
+how to get the Southern States back into the Union.  He needed
+quiet to think what to do.  But from morning till night the White
+House was crowded with people seeking his help.
+   About a hundred and fifty years after the pilgrims settled in
+this country, a young hunter picked up his gun.  He tossed it onto
+his shoulder and followed a buffalo trail across the mountains into
+what is now Kentucky.
+   His name was Daniel Boone.
+   He found wild country.  There were no settlers, no roads.  Indians
+hunted in the woods for food.  The country was beautiful and dangerous.
+But here was rich, free land -- miles and miles of it.
+   Many settlers, besides the Pilgrims, had come to the shores of
+America.  But they had stayed on the safe land between the sea and
+the mountains.
+   Columbus discovered America in 1492.  Later, other explorers
+visited the new land.  They told people in Europe of the forests,
+furs, and fish they found.  Many Europeans decided to settle in
+this wonderful land.  But some of the first settlers starved to
+death during the hard winters.  Others lived to build settlements
+or colonies for their mother countries.  Colonial America was
+beginning.  In 1607, three ships brought men from England to what
+is now Jamestown, Virginia.  They were looking for gold.
+   The leader, Captain John Smith, taught the men to build houses
+of stakes and branches.  They plastered the walls of the houses with
+mud.
+#copyin
+#user
+#uncopyin
+#match of
+#log
+#next
+4.1g 10
diff --git a/usr/lib/learn/morefiles/L4.1g b/usr/lib/learn/morefiles/L4.1g
new file mode 100644 (file)
index 0000000..7dd4f4f
--- /dev/null
@@ -0,0 +1,49 @@
+#print
+By default, "tail" prints the last 10 lines of its input.
+You can change this default amount by specifying a different
+amount as an optional argument.  For example,
+  tail -5 file
+prints the last 5 lines of "file". 
+Collect the last line of the file "Ref" in a new file
+called "last".  Type "ready" when you have finished.
+(By the way, there is a limit to how big the number can be,
+but it's usually at least 60 or 70 lines of normal text.)
+#create Ref
+   About a hundred and fifty years after the pilgrims settled in
+   Columbus discovered America in 1492.  Later, other explorers
+   He found wild country.  There were no settlers, no roads.  Indians
+   His name was Daniel Boone.
+   Many settlers, besides the Pilgrims, had come to the shores of
+   Now Abraham Lincoln was master of the White House.  But he was
+   The leader, Captain John Smith, taught the men to build houses
+America.  But they had stayed on the safe land between the sea and
+But here was rich, free land -- miles and miles of it.
+House was crowded with people seeking his help.
+President of only part of the United States.  For the Southern
+States has taken down the Star-Spangled Banner and raised the flag
+beginning.  In 1607, three ships brought men from England to what
+death during the hard winters.  Others lived to build settlements
+furs, and fish they found.  Many Europeans decided to settle in
+his shoulder and followed a buffalo trail across the mountains into
+how to get the Southern States back into the Union.  He needed
+hunted in the woods for food.  The country was beautiful and dangerous.
+is now Jamestown, Virginia.  They were looking for gold.
+mud.
+of stakes and branches.  They plastered the walls of the houses with
+of the Confederacy in its stead.  Sad and silent, Lincoln gazed
+or colonies for their mother countries.  Colonial America was
+quiet to think what to do.  But from morning till night the White
+the mountains.
+this country, a young hunter picked up his gun.  He tossed it onto
+this wonderful land.  But some of the first settlers starved to
+through his spyglass at the Confederate flag that fluttered in the
+visited the new land.  They told people in Europe of the forests,
+what is now Kentucky.
+wind on the other side of the Potomac River in Virginia.  He pondered
+#create X1
+wind on the other side of the Potomac River in Virginia.  He pondered
+#user
+#cmp X1 last
+#log
+#next
+5.1a 10
diff --git a/usr/lib/learn/morefiles/L4.2a b/usr/lib/learn/morefiles/L4.2a
new file mode 100644 (file)
index 0000000..7da4e62
--- /dev/null
@@ -0,0 +1,13 @@
+#print
+Is the command
+  cat <file
+identical to
+  cat file
+Answer yes or no.
+#copyin
+#user
+#uncopyin
+#match yes
+#log
+#next
+4.1b 10
diff --git a/usr/lib/learn/morefiles/L5.1a b/usr/lib/learn/morefiles/L5.1a
new file mode 100644 (file)
index 0000000..d3d1887
--- /dev/null
@@ -0,0 +1,23 @@
+#print
+If you think back over some of the exercises you've done
+so far in this course, they have involved collecting the
+output of one program (like "cat" or "grep" or "ls") in
+a file, then using that file as the input to another
+program, like "pr" or "wc" or "grep".
+For example, you could use "ls" and "wc" to _____\b\b\b\b\bcount
+the number of files in a directory.  Do that now,
+then type "answer N", where N is the number of files.
+#create X2
+#create X1
+#create this
+#create stuff
+#create foo
+#copyin
+#user
+#uncopyin
+ls | %s/../lcount >X1
+tail -1 .copy >X2
+#cmp X1 X2
+#log
+#next
+5.1b 10
diff --git a/usr/lib/learn/morefiles/L5.1b b/usr/lib/learn/morefiles/L5.1b
new file mode 100644 (file)
index 0000000..89b0411
--- /dev/null
@@ -0,0 +1,22 @@
+#print
+It seems silly to use a temporary file when all that's really
+needed is to take the output from one program like "ls",
+and pass it directly to the input of another, like "wc".
+One of the original contributions of Unix is a clean
+way to do this, called a "pipe".  You can connect two
+programs with a pipe like this:
+  ls | wc
+and the output of the first program goes into the input of
+the second without any intervening file.
+
+Try this pair of commands in a pipeline.
+Try an ordinary "ls" command too, to verify that you
+got the right answer.  Then type "ready".
+#create X1
+#copyin
+#user
+#uncopyin
+grep 'ls *| *wc' .copy >/dev/null
+#log
+#next
+5.1c
diff --git a/usr/lib/learn/morefiles/L5.1c b/usr/lib/learn/morefiles/L5.1c
new file mode 100644 (file)
index 0000000..5df6f8e
--- /dev/null
@@ -0,0 +1,40 @@
+#print
+Another use for pipes is to replace a command sequence that we
+did earlier with "cat", "pr" and a temporary file.  If you have
+a bunch of small files, using "pr" on them directly wastes
+paper, since each file takes a page.  You could say
+  cat memo* >temp
+  pr temp
+  rm temp
+but this is a nuisance (and the output will
+have the title "temp" on each page).  So use
+a pipe instead.
+In this directory there are some files whose
+names begin with "word".  Use "cat", "pr" and a pipe
+to print them, then type "ready".
+#create word1
+now
+is
+the
+time
+for
+all
+#create word2
+good
+men
+to
+come
+to
+the
+aid
+#create word3
+of
+their
+party.
+#copyin
+#user
+#uncopyin
+grep 'cat word.*| *pr' <.copy >/dev/null
+#log
+#next
+5.1d 10
diff --git a/usr/lib/learn/morefiles/L5.1d b/usr/lib/learn/morefiles/L5.1d
new file mode 100644 (file)
index 0000000..fbc7d3b
--- /dev/null
@@ -0,0 +1,32 @@
+#print
+How many lines of output does the command
+  cat word* | pr
+produce, as computed by "wc"?
+Type "answer N", where N is the number of lines.
+(Try to use a pipe, not a temporary file.)
+#create word1
+Now
+is
+the
+time
+#create word2
+for
+all
+good
+men
+#create word3
+to
+come
+to
+the
+aid
+of
+their
+party
+#copyin
+#user
+#uncopyin
+#match 66
+#log
+#next
+5.1e 10
diff --git a/usr/lib/learn/morefiles/L5.1e b/usr/lib/learn/morefiles/L5.1e
new file mode 100644 (file)
index 0000000..5eacc5a
--- /dev/null
@@ -0,0 +1,19 @@
+#print
+Use "ls", "pr" and a pipe to make a neat list of the files
+in this directory, sorted by time of last change.
+Do not use a temporary file.
+Type "ready" when you are done.
+#create x1
+adfasdfasdfaf
+
+#create junk
+qerqer
+#create foo
+fofofofofo
+#copyin
+#user
+#uncopyin
+grep 'ls -[l]*t.*| *pr' <.copy >/dev/null
+#log
+#next
+6.1a 10
diff --git a/usr/lib/learn/morefiles/L6.1a b/usr/lib/learn/morefiles/L6.1a
new file mode 100644 (file)
index 0000000..f0a8b9e
--- /dev/null
@@ -0,0 +1,35 @@
+#print
+Of course it is still possible to use files with "<" and ">"
+to supply input to one end of a pipeline and to
+collect the output from the other end.
+In this directory are two files whose names begin
+with "bio".  Collect the last 15 lines of these two files
+(combined) in a file called "last", then type "ready".
+#create bio1
+   Roughly speaking, your eye is made of three balls, or layers,
+fitted tightly one inside the other.  the tough white outermost
+layer's function is to protect the others.  the middle layer gives
+the front of your eye its brown, gray, or blue color.  The inside
+of this layer is dark and full of tiny blood vessels.  The innermost
+layer, called the retina, is made of very special nerve cells that
+are sensitive to light and color.  A nerve cord connects the retina
+of each eye to your brain.
+   The front of your eye's two outer layers (the cornea) is clear,
+or open, to let light enter.
+#create bio2
+   We do not know when life began on the earth, and it seems likely
+that the answer to this question will remain forever hidden from us.
+What we do know is that it was some 500 million years ago when the
+plants and animals of early geologic history had reached a stage of
+development where they produced hard parts capable of being preserved
+as fossils.
+   At this distant date there seemingly was no land life; all life
+was in the sea.  Moreover, there were no vertebrates, or backboned
+animals, living -- at least none of sufficient complexity that they
+left hard structures to be preserved in the form of fossils.
+#user
+cat bio* | tail -15 >X1
+#cmp X1 last
+#log
+#next
+6.1b 10
diff --git a/usr/lib/learn/morefiles/L6.1b b/usr/lib/learn/morefiles/L6.1b
new file mode 100644 (file)
index 0000000..e85277c
--- /dev/null
@@ -0,0 +1,128 @@
+#print
+Several of the programs we have been using as examples,
+such as "grep" and "wc", have the property that when
+you use file names with them, the output includes
+the file names.  For example, if you say
+  grep pattern file1 file2 file3
+each line that contains "pattern" is printed out
+with "file1:" or whatever in front of it.
+
+Sometimes you would love to get rid of that file name, since
+you don't care a bit where the line came from,
+and the file name clutters up the output.
+One thing is to use "cat" to collect the files, and
+pipe into "grep"; in that case "grep" doesn't mention
+any file name because there isn't one.
+
+In this directory there are several files whose names end 
+in ".x".  Use a pipeline of "cat" and "grep" to print all the lines
+that contain the letters "ion", without any identifying filenames.
+Type "ready" when you're done.
+#create 0x
+ion, but this one is in the wrong file!
+#create 1.x
+o
+o'
+oaf
+oafish
+oafishly
+oafishness
+oak
+oaken
+oaks
+oakum
+oar
+oared
+oarfish
+oarlock
+oarsman
+oases
+oasis
+oat
+oatcake
+oaten
+oath
+oaths
+oatmeal
+obbligati
+obbligato
+obbligatos
+obconic
+obcordate
+obduracy
+obdurate
+#create 2.x
+obdurately
+obdurateness
+obeah
+obedience
+obedient
+obediently
+obeisance
+obeisant
+obeli
+obelisk
+obelize
+obelus
+obese
+obesity
+obey
+obeyer
+obfuscate
+obfuscation
+obfuscatory
+obi
+obit
+obituary
+object
+objectification
+objectify
+objection
+objectionable
+objectionableness
+objectionably
+objective
+#create 3.x
+objectively
+objectiveness
+objectivism
+objectivist
+objectivistic
+objectivity
+objectless
+objector
+objurgate
+objurgation
+objurgatory
+oblanceolate
+oblast
+oblate
+oblate
+oblateness
+oblation
+obligate
+obligately
+obligation
+obligatorily
+obligatory
+oblige
+obligee
+obliger
+obliging
+obligingly
+obligingness
+obligor
+oblique
+obliquely
+obliqueness
+obliquity
+obliterate
+#copyout
+#user
+#uncopyout
+grep ion <.ocopy >X1
+cat *.x | grep ion >X2
+#cmp X1 X2
+#log
+#next
+6.1c
diff --git a/usr/lib/learn/morefiles/L6.1c b/usr/lib/learn/morefiles/L6.1c
new file mode 100644 (file)
index 0000000..5594986
--- /dev/null
@@ -0,0 +1,23 @@
+#print
+In much the same way that you used "cat" and a pipe to
+get rid of the file names from the output of "grep",
+you can use "cat" and a pipe to get rid of the sub-totals
+from "wc", if you so desire.
+What is the total number of lines in the files in
+this directory whose names begin with capital letters?
+Type "answer N", where N is the number of lines.
+#create X1
+just to make sure.
+#create Stuff
+this has some more.
+#create Junk
+asdfadfasdfasdfasdfasf
+#copyin
+#user
+#uncopyin
+cat [A-Z]* | %s/../lcount >x1
+tail -1 .copy >x2
+#cmp x1 x2
+#log
+#next
+6.1d
diff --git a/usr/lib/learn/morefiles/L6.1d b/usr/lib/learn/morefiles/L6.1d
new file mode 100644 (file)
index 0000000..47446b5
--- /dev/null
@@ -0,0 +1,56 @@
+#print
+How many of the lines in the files "bio*" and "chem*"
+contain the letters "the"?  Type "answer N", where
+N is the number of lines.
+#create bio1
+   Roughly speaking, your eye is made of three balls, or layers,
+fitted tightly one inside the other.  the tough white outermost
+layer's function is to protect the others.  the middle layer gives
+the front of your eye its brown, gray, or blue color.  The inside
+of this layer is dark and full of tiny blood vessels.  The innermost
+layer, called the retina, is made of very special nerve cells that
+are sensitive to light and color.  A nerve cord connects the retina
+of each eye to your brain.
+   The front of your eye's two outer layers (the cornea) is clear,
+or open, to let light enter.
+#create bio2
+   We do not know when life began on the earth, and it seems likely
+that the answer to this question will remain forever hidden from us.
+What we do know is that it was some 500 million years ago when the
+plants and animals of early geologic history had reached a stage of
+development where they produced hard parts capable of being preserved
+as fossils.
+   At this distant date there seemingly was no land life; all life
+was in the sea.  Moreover, there were no vertebrates, or backboned
+animals, living -- at least none of sufficient complexity that they
+left hard structures to be preserved in the form of fossils.
+#create chema
+   The baker said, "Now I shall put just the right amounts of water and
+yeast with the flour that is in the mixer.  Flour, water, and yeast
+together make the sponge.  Making sponge is the first step in making
+bread."
+   The baker closed the mixer.  Inside the machine, the flour and
+yeast and water went around and around until they were well mixed.
+Then the baker opened the mixer and the sponge dropped into a greased
+tub called a trough.
+   The baker pushed the trough into a warm room to let the sponge 
+rise.  It looked like dough, but it did not as yet have everything
+in it.
+#create chemb
+   Wash the blackboard.  Watch it dry.  The water goes into the air.
+When water goes into the air it evaporates.
+   Tie a damp cloth to one end of a stick.  Tie a bottle to the
+other end.  Put water in the bottle until the stick is level.  Watch
+the stick for a few minutes.  It does not stay level.
+   Water goes into the air when it evaporates.  It changes into
+water vapor.  You cannot see water vapor, but it is in the air all
+around you.
+   Cut a hold in the bottom of a cardboard box.  Hold the box
+against a cold window and blow into the hole.
+#copyin
+#user
+#uncopyin
+#match 30
+#log
+#next
+6.1e
diff --git a/usr/lib/learn/morefiles/L6.1e b/usr/lib/learn/morefiles/L6.1e
new file mode 100644 (file)
index 0000000..c75d50e
--- /dev/null
@@ -0,0 +1,38 @@
+#print
+By the way, you can also use "grep" to print out ___\b\b\ball ___\b\b\bbut
+those lines that contain occurrences of a pattern:
+  grep -v pat files...
+prints all the lines in files... that don't contain
+any "pat".
+How many of the lines in "bio*" don't contain "the"?
+Type "answer N", where N is the number of lines.
+#create bio1
+   Roughly speaking, your eye is made of three balls, or layers,
+fitted tightly one inside the other.  the tough white outermost
+layer's function is to protect the others.  the middle layer gives
+the front of your eye its brown, gray, or blue color.  The inside
+of this layer is dark and full of tiny blood vessels.  The innermost
+layer, called the retina, is made of very special nerve cells that
+are sensitive to light and color.  A nerve cord connects the retina
+of each eye to your brain.
+   The front of your eye's two outer layers (the cornea) is clear,
+or open, to let light enter.
+#create bio2
+   We do not know when life began on the earth, and it seems likely
+that the answer to this question will remain forever hidden from us.
+What we do know is that it was some 500 million years ago when the
+plants and animals of early geologic history had reached a stage of
+development where they produced hard parts capable of being preserved
+as fossils.
+   At this distant date there seemingly was no land life; all life
+was in the sea.  Moreover, there were no vertebrates, or backboned
+animals, living -- at least none of sufficient complexity that they
+left hard structures to be preserved in the form of fossils.
+#copyin
+#user
+#uncopyin
+#match 6
+#log
+#next
+7.1a 10
+6.2e 5
diff --git a/usr/lib/learn/morefiles/L6.2e b/usr/lib/learn/morefiles/L6.2e
new file mode 100644 (file)
index 0000000..190a33c
--- /dev/null
@@ -0,0 +1,106 @@
+#print
+How many words in the file "o" do not contain a
+slash "/"?  Type "answer N", where N is the number of words.
+#create o
+o
+o'
+oaf
+oaf/ish
+oaf/ish/ly
+oaf/ish/ness
+oak
+oak/en
+oaks
+oa/kum
+oar
+oared
+oar/fish
+oar/lock
+oars/man
+oa/ses
+oa/sis
+oat
+oat/cake
+oat/en
+oath
+oaths
+oat/meal
+ob/bli/ga/ti
+ob/bli/ga/to
+obbligatos
+ob/con/ic
+ob/cor/date
+ob/du/ra/cy
+ob/du/rate
+ob/du/rate/ly
+ob/du/rate/ness
+obe/ah
+obe/di/ence
+obe/di/ent
+obe/di/ent/ly
+obei/sance
+obei/sant
+ob/e/li
+ob/e/lisk
+ob/e/lize
+ob/e/lus
+obese
+obe/si/ty
+obey
+obey/er
+ob/fus/cate
+ob/fus/ca/tion
+ob/fus/ca/to/ry
+obi
+obit
+obit/u/ary
+ob/ject
+ob/jec/ti/fi/ca/tion
+ob/jec/ti/fy
+ob/jec/tion
+ob/jec/tion/able
+ob/jec/tion/able/ness
+ob/jec/tion/ably
+ob/jec/tive
+ob/jec/tive/ly
+ob/jec/tive/ness
+ob/jec/tiv/ism
+ob/jec/tiv/ist
+ob/jec/tiv/is/tic
+ob/jec/tiv/i/ty
+ob/ject/less
+ob/jec/tor
+ob/jur/gate
+ob/jur/ga/tion
+ob/jur/ga/to/ry
+ob/lan/ceo/late
+oblast
+ob/late
+oblate
+oblate/ness
+obla/tion
+ob/li/gate
+ob/li/gate/ly
+ob/li/ga/tion
+oblig/a/to/ri/ly
+oblig/a/to/ry
+oblige
+ob/li/gee
+oblig/er
+oblig/ing
+oblig/ing/ly
+oblig/ing/ness
+ob/li/gor
+oblique
+oblique/ly
+oblique/ness
+obliq/ui/ty
+oblit/er/ate
+oblit/er/a/tion
+#copyin
+#user
+#uncopyin
+#match 19
+#log
+#next
+7.1a
diff --git a/usr/lib/learn/morefiles/L7.1a b/usr/lib/learn/morefiles/L7.1a
new file mode 100644 (file)
index 0000000..08e7087
--- /dev/null
@@ -0,0 +1,9 @@
+#print
+Do you think that you have learned anything
+from this script?
+Answer yes or no.
+#copyin
+#user
+#uncopyin
+#match yes
+#log