This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



DIFFSTAT(1)                                                                                      DIFFSTAT(1)



NAME
       diffstat - make histogram from diff-output

SYNOPSIS
       diffstat [options] [file-specifications]

DESCRIPTION
       This program reads the output of diff and displays a histogram of the insertions, deletions, and mod-ifications modifications
       ifications per-file.  Diffstat is a program that is useful for reviewing large, complex patch  files.
       It  reads  from  one or more input files which contain output from diff, producing a histogram of the
       total lines changed for each file referenced.  If the input filename ends with .bz2, .Z or .gz, diff-stat diffstat
       stat will read the uncompressed data via a pipe from the corresponding program.

       Diffstat recognizes the most popular types of output from diff:

              unified
                     preferred by the patch utility.

              context
                     best for readability, but not very compact.

              default
                     not good for much, but simple to generate.

       Diffstat  detects the lines that are output by diff to tell which files are compared, and then counts
       the markers in the first column that denote the type of change (insertion, deletion or modification).
       These are shown in the histogram as "+", "-" and "!" characters.

       If  no filename is given on the command line, diffstat reads the differences from the standard input.

OPTIONS
       -c     prefix each line of output with "#", making it a comment-line for shell scripts.

       -e file
              redirect standard error to file.

       -f format
              specify the format of the histogram.

              0  for concise, which shows only the value and a single histogram code for each of insert (+),
                 delete (-) or modify (!)

              1  for normal output,

              2  to fill in the histogram with dots,

              4  to print each value with the histogram.

              Any  nonzero  value  gives a histogram.  The dots and individual values can be combined, e.g.,
              -f6 gives both.

       -h     prints the usage message and exits.

       -k     suppress the merging of filenames in the report.

       -l     lists only the filenames.  No histogram is generated.

       -n number
              specify the minimum width used for filenames.  If you don't specify this,  diffstat  uses  the
              length of the longest filename, after stripping common prefixes.

       -o file
              redirect standard output to file.

       -p number
              override the logic that strips common pathnames, simulating the patch "-p" option.

       -r  code
              provides  optional  rounding of the data shown in histogram, rather than truncating with error
              adjustments.

              0  is the default.  No rounding is performed, but accumulated errors are  added  to  following
                 columns.

              1  rounds the data

              2  rounds the data and adjusts the histogram to ensure that it displays something if there are
                 any differences even if those would normally be rounded to zero.

       -t     overrides the histogram, generates output of comma separated values.

       -u     suppress the sorting of filenames in the report.

       -v     show progress, e.g., if the output is redirected to a file, write  progress  messages  to  the
              standard error.

       -V     prints the current version number and exits.

       -w number
              specify  the maximum width of the histogram.  The histogram will never be shorter than 10 col-umns, columns,
              umns, just in case the filenames get too large.

ENVIRONMENT
       Diffstat runs in a portable UNIX(R) environment.

FILES
       Diffstat is a single binary module, which uses no auxiliary files.

BUGS
       Diffstat makes a lot of assumptions about the format of a diff file.

       There is no way to obtain a filename from the standard diff between two files with no options.   Con-text Context
       text diffs work, as well as unified diffs.

       There's  no  easy way to determine the degree of overlap between the "before" and "after" displays of
       modified lines.

SEE ALSO
       diff (1).

AUTHOR
       Thomas Dickey <dickey@invisible-island.net>.



                                                                                                 DIFFSTAT(1)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...