Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

CMF

CMT

1.1;cmsrf (compare_sorted_file), revision 1.1, 81/07/01
CMSRF (COMPARE_SORTED_FILE) -- Find lines common to two files.
usage:  CMSRF [-1] [-2] [-3] [-12] [-13] [-23] [-123] file1 [file2]


FORMAT

  CMSRF [options] file1 [file2]


  CMSRF  reads  sorted  files, file1 and file2, and produces 1-, 2-, or 3-column
  output.  Column 1 contains lines found only in file1, column 2 contains  lines
  found  only  in  file2,  and  column 3 contains lines found in both files. The
  number option, [-n], specifies which columns you want to print.    To  compare
  unsorted files, use CMF (COMPARE_FILE).


ARGUMENTS

  Use  of  a  hyphen  for  either  file name will cause the data to be read from
  standard input.

  file1
  (required)         Specify first file for comparison.

  file2
  (optional)         Specify second file for comparison.

                     Default if omitted:  compare file1 to standard input.


OPTIONS

  If no options are specified, CMSRF produces a complete 3-column report.

  -n                  Specify  number(s),  where  n  is  an   integer   sequence
                     representing the following:


                              1        Report only lines exclusive to file1.

                              2        Report only lines exclusive to file2.

                              3        Report only lines commmon to both files.



EXAMPLES

  1.  $ cmsrf -12 //us/sorted_stuff.c     Compare '//us/sorted_stuff.c
                                           to standard input and report
                                           lines found in either place,
                                           but not both.


  2.  $ cmsrf -3 //us/sorted_stuff.a //us/sorted_stuff.b

                                          Report only common lines
                                           for both files.


RELATED TOPICS

  More information is available.  Type:

  - HELP CMF
    for details about comparing unsorted files.

  - HELP CMT
    for details about comparing directory trees.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026