User Commands DIFFSTAT(1) NNNNAAAAMMMMEEEE ddddiiiiffffffffssssttttaaaatttt - make histogram from diff-output SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ddddiiiiffffffffssssttttaaaatttt [_o_p_t_i_o_n_s] [_f_i_l_e-_s_p_e_c_i_f_i_c_a_t_i_o_n_s] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN This program reads the output of ddddiiiiffffffff and displays a histo- gram of the insertions, deletions, and modifications 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 ddddiiiiffffffff, producing a histogram of the total lines changed for each file referenced. If the input filename ends with .bz2, .Z or .gz, diffstat will read the uncompressed data via a pipe from the corresponding pro- gram. Diffstat recognizes the most popular types of output from diff: unified preferred by the ppppaaaattttcccchhhh utility. context best for readability, but not very compact. default not good for much, but simple to generate. DDDDiiiiffffffffssssttttaaaatttt detects the lines that are output by ddddiiiiffffffff 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, ddddiiiiffffffffssssttttaaaatttt reads the differences from the standard input. OOOOPPPPTTTTIIIIOOOONNNNSSSS ----bbbb ignore lines matching "Binary files XXX and YYY differ" in the diff ----cccc prefix each line of output with "#", making it a comment-line for shell scripts. ----eeee _f_i_l_e redirect standard error to _f_i_l_e. ----ffff _f_o_r_m_a_t specify the format of the histogram. 0 for concise, which shows only the value and a single SunOS 5.10 Last change: 1 User Commands DIFFSTAT(1) 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., ----ffff6666 gives both. ----hhhh prints the usage message and exits. ----kkkk suppress the merging of filenames in the report. ----llll lists only the filenames. No histogram is generated. ----nnnn _n_u_m_b_e_r specify the minimum width used for filenames. If you don't specify this, ddddiiiiffffffffssssttttaaaatttt uses the length of the longest filename, after stripping common prefixes. ----oooo _f_i_l_e redirect standard output to _f_i_l_e. ----pppp _n_u_m_b_e_r override the logic that strips common pathnames, simu- lating the ppppaaaattttcccchhhh "-p" option. ----rrrr ccccooooddddeeee provides optional rounding of the data shown in histo- gram, rather than truncating with error adjustments. 0 is the default. No rounding is performed, but accu- mulated 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 differ- ences even if those would normally be rounded to zero. ----tttt overrides the histogram, generates output of comma separated values. ----uuuu suppress the sorting of filenames in the report. ----vvvv show progress, e.g., if the output is redirected to a file, write progress messages to the standard error. SunOS 5.10 Last change: 2 User Commands DIFFSTAT(1) ----VVVV prints the current version number and exits. ----wwww _n_u_m_b_e_r specify the maximum width of the histogram. The histo- gram will never be shorter than 10 columns, just in case the filenames get too large. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT DDDDiiiiffffffffssssttttaaaatttt runs in a portable UNIX(Reg.) environment. FFFFIIIILLLLEEEESSSS DDDDiiiiffffffffssssttttaaaatttt is a single binary module, which uses no auxiliary files. BBBBUUUUGGGGSSSS DDDDiiiiffffffffssssttttaaaatttt makes a lot of assumptions about the format of a ddddiiiiffffffff file. There is no way to obtain a filename from the standard diff between two files with no options. Context 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. SSSSEEEEEEEE AAAALLLLSSSSOOOO diff (1). AAAAUUUUTTTTHHHHOOOORRRR Thomas Dickey . SunOS 5.10 Last change: 3