[536] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: diff? and Addinf Man pages:

daemon@ATHENA.MIT.EDU (Michael J. Yanowitz)
Wed Oct 23 07:49:32 1996

Date: Wed, 23 Oct 1996 06:36:34 -0500
From: yanowitz@stereotaxis.wustl.edu (Michael J. Yanowitz)
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

  Thanks, but here are further questions:

  Here (below) is the man page for diff (for Solaris 2.4).

a) Can I assume it is the same syntax under Linux?

b) How do I add a new man page?

> On Tue, 22 Oct 1996, Erik Troan wrote:
> 
> > On Tue, 22 Oct 1996, Michael J. Yanowitz wrote:
> > 
> > > 1) The man page for diff is missing? Which package is it in?
> > 
> > There isn't one :-( GNU doesn't include one.
> 
> There is an 'info' page for it however.
> 
> Bob
> 

 
> 
> diff(1)                   User Commands                   diff(1)
> 
> 
> 
> NAME
>      diff - display line-by-line  differences  between  pairs  of
>      text files
> 
> SYNOPSIS
>      diff [ -bitw ] [ -c | -e | -f | -h | -n ]
>           _f_i_l_e_n_a_m_e_1 _f_i_l_e_n_a_m_e_2
>      diff [ -bitw ] [ -C _n_u_m_b_e_r ] _f_i_l_e_n_a_m_e_1 _f_i_l_e_n_a_m_e_2
>      diff [ -bitw ] [ -D _s_t_r_i_n_g ] _f_i_l_e_n_a_m_e_1 _f_i_l_e_n_a_m_e_2
>      diff [ -bitw ] [ -c | -e | -f | -h | -n ] [ -l ] [ -r ]
>           [ -s ] [ -S _n_a_m_e ] _d_i_r_e_c_t_o_r_y_1 _d_i_r_e_c_t_o_r_y_2
> 
> AVAILABILITY
>      SUNWdoc
> 
> DESCRIPTION
>      _dddd_iiii_ffff_ffff tells what lines must be changed in two files to  bring
>      them  into  agreement.   If  _f_i_l_e_n_a_m_e_1 (_f_i_l_e_n_a_m_e_2) is _----, the
>      standard input is  used.   If  _f_i_l_e_n_a_m_e_1  (_f_i_l_e_n_a_m_e_2)  is  a
>      directory,  then  a  file  in  that  directory with the name
>      _f_i_l_e_n_a_m_e_2 (_f_i_l_e_n_a_m_e_1) is used.  The normal  output  contains
>      lines of these forms:
> 
>           _n_1 _aaaa _n_3,_n_4
>           _n_1,_n_2 _dddd _n_3
>           _n_1,_n_2 _cccc _n_3,_n_4
> 
>      These lines resemble _eeee_dddd commands to convert  _f_i_l_e_n_a_m_e_1  into
>      _f_i_l_e_n_a_m_e_2.    The  numbers  after  the  letters  pertain  to
>      _f_i_l_e_n_a_m_e_2.  In fact, by exchanging _aaaa for _dddd and reading back-
>      ward one may ascertain equally how to convert _f_i_l_e_n_a_m_e_2 into
>      _f_i_l_e_n_a_m_e_1.  As in _eeee_dddd, identical pairs, where _n_1 = _n_2 or _n_3 =
>      _n_4, are abbreviated as a single number.
> 
>      Following each of these lines come all the  lines  that  are
>      affected  in the first file flagged by _<<<<, then all the lines
>      that are affected in the second file flagged by _>>>>.
> 
> OPTIONS
>      -b              Ignores trailing blanks  (spaces  and  tabs)
>                     and   treats   other  strings  of  blanks  as
>                     equivalent.
> 
>      -i              Ignores the case of  letters;  for  example,
>                     `_AAAA' will compare equal to `_aaaa'.
> 
>      -t              Expands  TAB  characters  in  output  lines.
>                     Normal  or -c output adds character(s) to the
>                     front of each line that may adversely  affect
>                     the  indentation of the original source lines
>                     and make the output lines difficult to inter-
>                     pret.  This option will preserve the original
> 
> 
> 
> SunOS 5.4           Last change: 26 Sep 1992                    1
> 
> 
> 
> 
> 
> 
> diff(1)                   User Commands                   diff(1)
> 
> 
> 
>                     source's indentation.
> 
>      -w              Ignores all blanks (SPACE  and  TAB  charac-
>                     ters)  and treats all other strings of blanks
>                     as equivalent; for  example,  `_iiii_ffff _(((( _aaaa _====_==== _bbbb _))))'
>                     will compare equal to `_iiii_ffff_((((_aaaa_====_====_bbbb_))))'.
> 
>      The following options are mutually exclusive:
> 
>      -c              Produces a listing of differences with three
>                     lines  of  context.   With this option output
>                     format is modified slightly:   output  begins
>                     with identification of the files involved and
>                     their creation dates,  then  each  change  is
>                     separated  by  a  line with a dozen _****'s.  The
>                     lines removed from _f_i_l_e_n_a_m_e_1 are marked  with
>                     '-'; those added to _f_i_l_e_n_a_m_e_2 are marked '+'.
>                     Lines that are changed from one file  to  the
>                     other are marked in both files with '!'.
> 
>      -C _n_u_m_b_e_r       Produces a listing of differences  identical
>                     to  that  produced by -c with _n_u_m_b_e_r lines of
>                     context.
> 
>      -e              Produces a script of _a, _c,  and  _d  commands
>                     for   the  editor  _eeee_dddd,  which  will  recreate
>                     _f_i_l_e_n_a_m_e_2 from _f_i_l_e_n_a_m_e_1.  In connection with
>                      - e  ,  the following shell program may help
>                     maintain multiple versions of a  file.   Only
>                     an   ancestral  file  ($1)  and  a  chain  of
>                     version-to-version  _eeee_dddd  scripts   ($2,$3,...)
>                     made  by  diff  need  be on hand.  A ``latest
>                     version'' appears on the standard output.
> 
>                     _((((_ssss_hhhh_iiii_ffff_tttt_;;;; _cccc_aaaa_tttt _$$$$_****_;;;; _eeee_cccc_hhhh_oooo _''''_1111_,,,,_$$$$_pppp_''''_)))) _|||| _eeee_dddd _---- _$$$$_1111
> 
>      Except in rare circumstances, diff finds a  smallest  suffi-
>      cient set of file differences.
> 
>      -f              Produces a similar script, not  useful  with
>                     ed , in the opposite order.
> 
>      -h              Does a fast,  half-hearted  job.   It  works
>                     only  when  changed  stretches  are short and
>                     well separated, but does  work  on  files  of
>                     unlimited length.  Options -e and -f are una-
>                     vailable with -h .
> 
>      -n              Produces a script similar to -e , but in the
>                     opposite  order  and  with a count of changed
>                     lines on each insert or delete command.
> 
> 
> 
> 
> SunOS 5.4           Last change: 26 Sep 1992                    2
> 
> 
> 
> 
> 
> 
> diff(1)                   User Commands                   diff(1)
> 
> 
> 
>      -D _s_t_r_i_n_g       Creates a merged version  of  _f_i_l_e_n_a_m_e_1  and
>                     _f_i_l_e_n_a_m_e_2   with   C   preprocessor  controls
>                     included so that a compilation of the  result
>                     without defining _s_t_r_i_n_g is equivalent to com-
>                     piling _f_i_l_e_n_a_m_e_1, while defining _s_t_r_i_n_g  will
>                     yield _f_i_l_e_n_a_m_e_2.
> 
>      The following options are used for comparing directories:
> 
>      -l              Produce output in long format.   Before  the
>                     _dddd_iiii_ffff_ffff,  each  text file is piped through pr(1)
>                     to paginate it.  Other differences are remem-
>                     bered  and  summarized  after  all  text file
>                     differences are reported.
> 
>      -r              Applies diff recursively to common subdirec-
>                     tories encountered.
> 
>      -s              Reports files that are the identical;  these
>                     would not otherwise be mentioned.
> 
>      -S _n_a_m_e         Starts  a  directory  diff  in  the  middle,
>                     beginning with the file _n_a_m_e.
> 
> ENVIRONMENT
>      If any  of  the  LC_*  variables  (  LC_CTYPE,  LC_MESSAGES,
>      LC_TIME,  LC_COLLATE,  LC_NUMERIC,  and  LC_MONETARY  ) (see
>      environ(5)) are not set in the environment, the  operational
>      behavior  of  diff for each corresponding locale category is
>      determined by the value of the  LANG  environment  variable.
>      If LC_ALL is set, its contents are used to override both the
>      LANG and the other LC_* variables.  If  none  of  the  above
>      variables  is  set in the environment, the "C"  (U.S. style)
>      locale determines how diff behaves.
> 
>      LC_CTYPE
>           Determines how diff handles characters.  When  LC_CTYPE
>           is  set  to  a valid value, diff can display and handle
>           text and filenames containing valid characters for that
>           locale.  diff can display and handle Extended Unix Code
>           (EUC) characters where any individual character can  be
>           1, 2, or 3 bytes wide. diff can also handle EUC charac-
>           ters of 1, 2, or more column widths. In the "C" locale,
>           only characters from ISO 8859-1 are valid. 
> 
> 
> 
> SunOS 5.4           Last change: 26 Sep 1992                    3
> 
> 
> diff(1)                   User Commands                   diff(1)
> 
> 
> 
>      LC_MESSAGES
>           Determines how diagnostic and informative messages  are
>           presented.  This includes the language and style of the
>           messages, and the correct form of affirmative and nega-
>           tive  responses.   In  the "C" locale, the messages are
>           presented in the default  form  found  in  the  program
>           itself (in most cases, U.S. English).
> 
> FILES
>      /tmp/d?????
>      /usr/lib/diffh for -h
>      /usr/bin/pr
> 
> SEE ALSO
>      bdiff(1),   cmp(1),   comm(1),   ed(1),   pr(1),   sdiff(1),
>      environ(5)
> 
> DIAGNOSTICS
>      Exit status is 0 for no differences, 1 for some differences,
>      2 for trouble.
> 
> NOTES
>      Editing scripts produced under the -e or -f option are naive
>      about creating lines consisting of a single period (_....).
> 
>      Missing newline at end of file indicates that the last  line
>      of  file  X  did not have a new-line.  If the lines are dif-
>      ferent, they will be flagged and output; although the output
>      will seem to indicate they are the same.
> 
> SunOS 5.4           Last change: 26 Sep 1992                    4
> 
> 
> 
> 
> 


--
  PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-HOWTO 
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post