home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils~1 / man / manpages.zoo / combine.1 < prev    next >
Encoding:
Text File  |  1991-11-11  |  9.2 KB  |  260 lines

  1.  
  2.  
  3.  
  4. COMBINE(1)                                             COMBINE(1)
  5.  
  6.  
  7.  
  8. N✓N✓N✓NA✓A✓A✓AM✓M✓M✓ME✓E✓E✓E
  9.      combine, combine2 - compare or combine 2 or 3 source files
  10.  
  11. S✓S✓S✓SY✓Y✓Y✓YN✓N✓N✓NO✓O✓O✓OP✓P✓P✓PS✓S✓S✓SI✓I✓I✓IS✓S✓S✓S
  12.      c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e   [-✓-✓-✓-B✓B✓B✓Bb✓b✓b✓bH✓H✓H✓Hh✓h✓h✓hq✓q✓q✓qs✓s✓s✓s] [-✓-✓-✓-c✓c✓c✓c #,#] [-✓-✓-✓-d✓d✓d✓d flag] [-✓-✓-✓-L✓L✓L✓L #] [-✓-✓-✓-P✓P✓P✓P #] [-✓-✓-✓-p✓p✓p✓p #]
  13.                [-✓-✓-✓-1✓1✓1✓1 text] [-✓-✓-✓-2✓2✓2✓2 text]
  14.                old_file new1_file [new2_file]
  15.  
  16.      c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e2✓2✓2✓2   temp_file merged_file
  17.  
  18. D✓D✓D✓DE✓E✓E✓ES✓S✓S✓SC✓C✓C✓CR✓R✓R✓RI✓I✓I✓IP✓P✓P✓PT✓T✓T✓TI✓I✓I✓IO✓O✓O✓ON✓N✓N✓N
  19.      _✓C_✓o_✓m_✓b_✓i_✓n_✓e compares the differences between 2 or 3 source files
  20.      and produces a result file.  Where `old_file' is the name of
  21.      the original file, `new1_file' is a file containing  modifi-
  22.      cations  to `old_file', and `new2_file' is a file containing
  23.      a different set of modifications to `old_file'.
  24.  
  25.      The option arguments are:
  26.  
  27.      -✓-✓-✓-H✓H✓H✓H       Help option -- Print a brief help message and exit.
  28.  
  29.      -✓-✓-✓-b✓b✓b✓b       Blank compress option -- Causes  _✓c_✓o_✓m_✓b_✓i_✓n_✓e  to  treat
  30.               all  sequences  of  blanks and horizontal tabs as a
  31.               single blank.
  32.  
  33.      -✓-✓-✓-B✓B✓B✓B       Blank remove option -- Causes _✓c_✓o_✓m_✓b_✓i_✓n_✓e to ignore all
  34.               blanks and horizontal tabs in a line when comparing
  35.               lines.
  36.  
  37.      -✓-✓-✓-c✓c✓c✓c #✓#✓#✓#,✓,✓,✓,#✓#✓#✓#   Column specification option -- Specifies the column
  38.               range  to be compared.  By default, all columns are
  39.               compared.  The number of the first column  to  com-
  40.               pare immediately follows the -✓-✓-✓-c✓c✓c✓c option.  The number
  41.               of the last column to compare is separated from the
  42.               first  column to compare by a comma.  Up to 32 dif-
  43.               ferent column ranges may be given.
  44.  
  45.               For example,
  46.                     combine -c10,20 a b c
  47.               compares only columns 10 through 20.
  48.  
  49.      -✓-✓-✓-d✓d✓d✓d f✓f✓f✓fl✓l✓l✓la✓a✓a✓ag✓g✓g✓g  Debug options -- specifies how much debug  informa-
  50.               tion is to be output.  The possibilities are:  -✓-✓-✓-d✓d✓d✓d1✓1✓1✓1,✓,✓,✓,
  51.               pass1 debug; -✓-✓-✓-d✓d✓d✓d2✓2✓2✓2,✓,✓,✓, pass2 debug;  -✓-✓-✓-d✓d✓d✓d3✓3✓3✓3,✓,✓,✓,  pass3  debug;
  52.               -✓-✓-✓-d✓d✓d✓d4✓4✓4✓4,✓,✓,✓,  pass4  debug;  -✓-✓-✓-d✓d✓d✓d5✓5✓5✓5,✓,✓,✓, pass5 debug; and -✓-✓-✓-d✓d✓d✓da✓a✓a✓a,✓,✓,✓, all
  53.               debug.
  54.  
  55.      -✓-✓-✓-h✓h✓h✓h       h option -- produces a composite file  on  standard
  56.               output  suitable  for  input into _✓c_✓o_✓m_✓b_✓i_✓n_✓e_✓2(1).  The
  57.               file is an ASCII text file which  may  be  manually
  58.               modified  by  an  text  editor  such as _✓v_✓i(1).  The
  59.  
  60.  
  61.  
  62. Page 1                          D
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. COMBINE(1)                                             COMBINE(1)
  70.  
  71.  
  72.  
  73.               example below describes the use of this  option  in
  74.               detail.
  75.  
  76.      -✓-✓-✓-L✓L✓L✓L #✓#✓#✓#     Lines option -- Specify the number of lines  to  be
  77.               printed  on  a  page  of  the standard output file.
  78.               Specifying zero lines (-✓-✓-✓-L✓L✓L✓L0✓0✓0✓0) disables pagination  of
  79.               the  output  file.  The  default  page length is 66
  80.               lines.  This option is used only if the  -✓-✓-✓-h✓h✓h✓h  option
  81.               is not specified.
  82.  
  83.      -✓-✓-✓-p✓p✓p✓p #✓#✓#✓#     Postfix option -- The number of unchanged lines  to
  84.               output  to  the  standard output file following any
  85.               group of changed lines.  The  number  of  unchanged
  86.               lines is specified by the argument following the -✓-✓-✓-p✓p✓p✓p
  87.               option. The default is 5.  This option is used only
  88.               if the -✓-✓-✓-h✓h✓h✓h option is not specified.
  89.  
  90.      -✓-✓-✓-P✓P✓P✓P #✓#✓#✓#     Prefix option -- The number of unchanged  lines  to
  91.               output  to  the  standard  output file prior to any
  92.               group of changed lines.  The  number  of  unchanged
  93.               lines is specified by the argument following the -✓-✓-✓-P✓P✓P✓P
  94.               option. The default is 5.  This option is used only
  95.               if the -✓-✓-✓-h✓h✓h✓h option is not specified.
  96.  
  97.      -✓-✓-✓-q✓q✓q✓q       Quiet option -- Specifies that no output is  to  be
  98.               generated to the standard output file if no changes
  99.               are detected.
  100.  
  101.      -✓-✓-✓-s✓s✓s✓s       Statistics option  --  Specifies  that  performance
  102.               statistics are to be output to standard output when
  103.               c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e is finished.
  104.  
  105.      -✓-✓-✓-1✓1✓1✓1 t✓t✓t✓te✓e✓e✓ex✓x✓x✓xt✓t✓t✓t  New1 file description --  Symbolic  description  of
  106.               the  `new1'  file.  This  text  is  printed  as the
  107.               description of the new1 file on the listing  output
  108.               and h option output file.
  109.  
  110.      -✓-✓-✓-2✓2✓2✓2 t✓t✓t✓te✓e✓e✓ex✓x✓x✓xt✓t✓t✓t  New2 file description --  Symbolic  description  of
  111.               the  `new2'  file.  This  text  is  printed  as the
  112.               description of the new1 file on the listing  output
  113.               and h option output file.
  114.  
  115. E✓E✓E✓EX✓X✓X✓XA✓A✓A✓AM✓M✓M✓MP✓P✓P✓PL✓L✓L✓LE✓E✓E✓E
  116.      _✓C_✓o_✓m_✓b_✓i_✓n_✓e may be used to perform a simple two file comparison.
  117.      by merely omitting the name of the third file.
  118.  
  119.      _✓C_✓o_✓m_✓b_✓i_✓n_✓e is best suited to do a three file comparison.   Con-
  120.      sider  a  file which is being modified along two development
  121.      paths.  The original copy of the file with no  modifications
  122.      is  called  the  `old'  file.   The  copy modified along one
  123.      development path is called the `new1' file.  The copy  modi-
  124.      fied  along  the other development path is called the `new2'
  125.  
  126.  
  127.  
  128. Page 2                          D
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. COMBINE(1)                                             COMBINE(1)
  136.  
  137.  
  138.  
  139.      file.  The following is a guide  for  producing  a  'merged'
  140.      file which contains both set of modifications.
  141.  
  142.      First, _✓c_✓o_✓m_✓b_✓i_✓n_✓e is called with the following command line:
  143.         combine -h old new1 new2 >temp_file
  144.      The `temp_file' contains all of the lines  from  the  `old',
  145.      `new1'  and `new2' files combined with control lines. A con-
  146.      trol line identifies those portions of the `temp_file' which
  147.      represent modifications made by the `new1' and `new2' files.
  148.  
  149.      Text which is inserted by the `new1' or `new2' file is  sur-
  150.      rounded  by  an ~~Insert line and an ~End line. The ~~Insert
  151.      line also contains comments  indicating  which  of  the  two
  152.      files the inserted lines came from and whether the insertion
  153.      was involved in a `move' operation.  In the  example  below,
  154.      the  line  `apple' was inserted between two already existing
  155.      lines `bob' and `fred'.
  156.          bob
  157.          ~~Insert 'file2'
  158.          apple
  159.          ~End of changes
  160.          fred
  161.      Text which is deleted by the `new1' or `new2' file  is  sur-
  162.      rounded  by  an ~~Delete line and an ~End line. The ~~Delete
  163.      line also contains comments  indicating  which  of  the  two
  164.      files deleted the specified lines an whether the deletion is
  165.      a side effect of a `move' operation.  In the example  below,
  166.      the  line  `apple'  was deleted from between the lines `bob'
  167.      and `fred'.
  168.          bob
  169.          ~~Delete 'file1'
  170.          apple
  171.          ~End of changes
  172.          fred
  173.      The `temp_file' may be edited with any text editor.  Changes
  174.      in the `temp_file' can easily be found by finding lines with
  175.      two tildes (~~) on them. Changes which are correct should be
  176.      left alone. Changes which are wrong should be fixed. Deleted
  177.      text can be allowed to remain in the file by merely deleting
  178.      the  ~~Delete line. Things to watch out for during this pro-
  179.      cess include:  Lines which are inserted by both  the  `new1'
  180.      and  `new2'  files,  and lines which are deleted by both the
  181.      `new1' and `new2' files.
  182.  
  183.      After all of the changes have been  made  in  the  tempfile,
  184.      _✓c_✓o_✓m_✓b_✓i_✓n_✓e_✓2(_✓1) should be used to produce the merged file.  _✓C_✓o_✓m_✓-
  185.      _✓b_✓i_✓n_✓e_✓2(_✓1) is called with the following command line:
  186.            combine2 temp_file merged_file
  187.  
  188.  
  189. Page 3                          D
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. COMBINE(1)                                             COMBINE(1)
  197.  
  198.  
  199.  
  200.      _✓C_✓o_✓m_✓b_✓i_✓n_✓e_✓2(_✓1) produces a merged file by removing  the  control
  201.      lines  and the deleted lines from the temp file. If the name
  202.      of the temp file is omitted, standard input is used. If  the
  203.      name of the merged file is omitted, standard output is used.
  204.  
  205. S✓S✓S✓SE✓E✓E✓EE✓E✓E✓E A✓A✓A✓AL✓L✓L✓LS✓S✓S✓SO✓O✓O✓O
  206.      cmp(1), combine2(1), comm(1), diff(1), diff3(1)
  207.  
  208. D✓D✓D✓DI✓I✓I✓IA✓A✓A✓AG✓G✓G✓GN✓N✓N✓NO✓O✓O✓OS✓S✓S✓ST✓T✓T✓TI✓I✓I✓IC✓C✓C✓CS✓S✓S✓S
  209.      Exit status is 0 for files identical,  1  for  some  differ-
  210.      ences, 2 for errors.
  211.  
  212. A✓A✓A✓AU✓U✓U✓UT✓T✓T✓TH✓H✓H✓HO✓O✓O✓OR✓R✓R✓R
  213.      Clifford P. Van Dyke
  214.  
  215. B✓B✓B✓BU✓U✓U✓UG✓G✓G✓GS✓S✓S✓S
  216.      Does not allow input file to be specified as -  to  indicate
  217.      stdin.
  218.  
  219.      Does not allow comparison of binary files. Does  not  always
  220.      complain if an input file is a binary file.
  221.  
  222.      Does not check to see if two files have the same inode.
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255. Page 4                          D
  256.  
  257.  
  258.  
  259.