Epsilon User's Manual and Reference >
Commands by Topic >
Changing Text >
Comparing By Lines
Like compare-windows and diff, the
compare-sorted-windows command compares the contents of the
current buffer with that displayed in the next window on the screen,
but it generates lists of lines that appear in both buffers or just
Use it when you have (for example) two lists of variable names, and
you want to find out which variables appear on only one or the other
list, and which appear on both. This command assumes that you sorted
both the buffers. It copies all lines appearing in both buffers to a
buffer named "inboth". It copies all lines that appear only in the
first buffer to a buffer named "only1", and lines that appear only
in the second to a buffer named "only2".
The uniq command goes through the current buffer and looks for
adjacent identical lines, deleting the duplicate copies of each
repeated line and leaving just one. It doesn't modify any lines that
only occur once. This command behaves the same as the Unix command of
the same name.
The keep-unique-lines command deletes all copies of any duplicated
lines. This command acts like the Unix command "uniq -u".
The keep-duplicate-lines command deletes all lines that only
occur once, and leaves one copy of each duplicated line. This
command acts like the Unix command "uniq -d".
The following table shows how sample text would be modified by each
of the above commands.
| ||Sample text ||Uniq ||Keep-duplicate-lines ||Keep-unique-lines|
| ||dog ||dog ||dog ||cat|
| ||dog ||cat ||horse ||rabbit|
| ||cat ||horse || ||dog|
| ||horse ||rabbit || |
| ||horse ||dog || |
| ||horse || || |
| ||rabbit || || |
| ||dog || || |
Epsilon Programmer's Editor 14.01 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.