summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/files/L12.1a
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/learn/lib/files/L12.1a')
-rw-r--r--usr.bin/learn/lib/files/L12.1a42
1 files changed, 42 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/files/L12.1a b/usr.bin/learn/lib/files/L12.1a
new file mode 100644
index 00000000000..5cd4f7c3d54
--- /dev/null
+++ b/usr.bin/learn/lib/files/L12.1a
@@ -0,0 +1,42 @@
+#print
+Another very useful command is the command
+ diff x y
+which compares two files. It will not print
+any output if the two files are the same, but
+if the files are different it will print
+out the lines that are changed in the two files,
+indicating the lines from the first file (x) by a leading "<"
+and the lines from the second file (y) by a leading ">".
+There are two files in this directory named "old" and "new".
+Why don't you first print both files, and then
+try using "diff" to compare them? Suppose the files
+were hundreds of lines long, and you needed to know
+the single difference - do you see how valuable "diff" can be?
+As evidence that you did at least half of this,
+type "answer word" where "word" is the word added to the
+second file.
+#create new
+Four score and seven
+years ago our fathers
+brought forth on this
+continent a new nation,
+conceived in liberty
+and dedicated to the
+proposition that all
+men are created equal.
+#create old
+Four score and seven
+years ago our fathers
+brought forth on this
+continent a new nation,
+conceived in liberty
+and dedicated the
+proposition that all
+men are created equal.
+#copyin
+#user
+#uncopyin
+#match to
+#log
+#next
+13.1a