You are not logged in.

#1 2013-09-07 21:02:34

Registered: 2012-01-11
Posts: 72

[SOLVED] @@ +35,7 -35,8 @@ In English Please

I ran dispatch-conf and did not understand a header line for the config files difference. It looked something like: "@@ +35,7 -35,8 @@". I don't see how the numbers could be providing meaning. Can't tell how they are line numbers, character counts,...? AFTER I ran dispatch-conf and chose the old config file based on lines starting with + or -, I looked at the manpage for dispatch-conf. I can't access the dispatch-conf help with 'h' unless dispatch-conf will take my input, which it now will not. I can't figure out what diff program dispatch-conf is using to find documentation on it.

Where is the documentation on comparison output from dispatch-conf? Is it in dispatch-conf?, and I mean useful documentation to answer my question. I don't see anything online to answer my question. Seems weird to me that this basic documentation is not easily accessible, so maybe it is. Or maybe it isn't.


OK...searched on "dispatch-conf help" and found:

It says: "In the above, @@ -7,4 means that this snippet starts at line 7 of the original file and is 4 lines in length. Likewise, +7,4 @@ means that this same snippet starts at line 7 of the new file and is 4 lines in length."

So there you go:
(1) '@@' means who knows what, let's say it delimits the header of the comparison with its meta info like matching html tags.
(2) # before the leftmost comma means the starting line number of the SNIPPIT in the ORIGINAL file; before the rightmost comma, the NEW file.
(3) # after the comma means the number of lines of the SNIPPIT. I guess that means the snippit in the original or new file, respectively, not the composite snippit from the output, but only your undertaker knows for sure.

So now we have a little documentation for those of use who are not psychic. I don't know why a pithy abstract essence is so hard to document. I hope this helps someone who simply wants the answer to an obvious question. There it is in four lines.

Forgive me. I'm off my meds today. Living dangerously.


#2 2013-09-08 14:51:48

From: Germany, NRW, Heiligenhaus
Registered: 2011-07-03
Posts: 283

Re: [SOLVED] @@ +35,7 -35,8 @@ In English Please

man diff


#3 2013-09-16 16:36:56

Registered: 2012-01-11
Posts: 72

Re: [SOLVED] @@ +35,7 -35,8 @@ In English Please

The manpage for diff does not explain the '@@...@@' header. It's different with diff. This is what my diff manpage looks like (with some cut-paste mistranslations):

DIFF(1)                          User Commands                         DIFF(1)

       diff - compare files line by line

       1mdiff 22m[4mOPTION24m]... 4mFILES0m

       Compare FILES line by line.

       Mandatory  arguments  to  long  options are mandatory for short options

              output a normal diff (the default)

       1m-q22m, 1m--brief0m
              report only when files differ

       1m-s22m, 1m--report-identical-files0m
              report when two files are the same

       1m-c22m, 1m-C 22mNUM, 1m--context22m[=4mNUM24m]
              output NUM (default 3) lines of copied context

       1m-u22m, 1m-U 22mNUM, 1m--unified22m[=4mNUM24m]
              output NUM (default 3) lines of unified context

       1m-e22m, 1m--ed0m
              output an ed script

       1m-n22m, 1m--rcs0m
              output an RCS format diff

       1m-y22m, 1m--side-by-side0m
              output in two columns

       1m-W22m, 1m--width22m=4mNUM0m
              output at most NUM (default 130) print columns

              output only the left column of common lines

              do not output common lines

       1m-p22m, 1m--show-c-function0m
              show which C function each change is in

       1m-F22m, 1m--show-function-line22m=4mRE0m
              show the most recent line matching RE

       1m--label 22mLABEL
              use LABEL instead of file name (can be repeated)

       1m-t22m, 1m--expand-tabs0m
              expand tabs to spaces in output

       1m-T22m, 1m--initial-tab0m
              make tabs line up by prepending a tab

              tab stops every NUM (default 8) print columns

              suppress space or tab before empty output lines

       1m-l22m, 1m--paginate0m
              pass output through `pr' to paginate it

       1m-r22m, 1m--recursive0m
              recursively compare any subdirectories found

       1m-N22m, 1m--new-file0m
              treat absent files as empty

              treat absent first files as empty

              ignore case when comparing file names

              consider case when comparing file names

       1m-x22m, 1m--exclude22m=4mPAT0m
              exclude files that match PAT

       1m-X22m, 1m--exclude-from22m=4mFILE0m
              exclude files that match any pattern in FILE

       1m-S22m, 1m--starting-file22m=4mFILE0m
              start with FILE when comparing directories

              compare FILE1 to all operands; FILE1 can be a directory

              compare all operands to FILE2; FILE2 can be a directory

       1m-i22m, 1m--ignore-case0m
              ignore case differences in file contents

       1m-E22m, 1m--ignore-tab-expansion0m
              ignore changes due to tab expansion

       1m-Z22m, 1m--ignore-trailing-space0m
              ignore white space at line end

       1m-b22m, 1m--ignore-space-change0m
              ignore changes in the amount of white space

       1m-w22m, 1m--ignore-all-space0m
              ignore all white space

       1m-B22m, 1m--ignore-blank-lines0m
              ignore changes whose lines are all blank

       1m-I22m, 1m--ignore-matching-lines22m=4mRE0m
              ignore changes whose lines all match RE

       1m-a22m, 1m--text0m
              treat all files as text

              strip trailing carriage return on input

       1m-D22m, 1m--ifdef22m=4mNAME0m
              output merged file with `#ifdef NAME' diffs

              format GTYPE input groups with GFMT

              format all input lines with LFMT

              format LTYPE input lines with LFMT

              These format options provide fine-grained control over the  out‐

              of diff, generalizing 1m-D22m/--ifdef.

       LTYPE is `old', `new', or `unchanged'.
              GTYPE is LTYPE or `changed'.

              GFMT (only) may contain:

       %<     lines from FILE1

       %>     lines from FILE2

       %=     lines common to FILE1 and FILE2

              printf-style spec for LETTER

              LETTERs are as follows for new group, lower case for old group:

       F      first line number

       L      last line number

       N      number of lines = L-F+1

       E      F-1

       M      L+1

              if A equals B then T else E

              LFMT (only) may contain:

       %L     contents of line

       %l     contents of line, excluding any trailing newline

              printf-style spec for input line number

              Both GFMT and LFMT may contain:

       %%     %

       %c'C'  the single character C

              the character with octal code OOO

       C      the character C (other characters represent themselves)

       1m-d22m, 1m--minimal0m
              try hard to find a smaller set of changes

              keep NUM lines of the common prefix and suffix

              assume large files and many scattered small changes

       1m--help 22mdisplay this help and exit

       1m-v22m, 1m--version0m
              output version information and exit

       FILES  are  `FILE1  FILE2'  or `DIR1 DIR2' or `DIR FILE...' or `FILE...
       DIR'.  If 1m--from-file 22mor 1m--to-file 22mis given, there are no  restrictions
       on  FILE(s).   If a FILE is `-', read standard input.  Exit status is 0
       if inputs are the same, 1 if different, 2 if trouble.

       Written by Paul Eggert, Mike Haertel, David  Hayes,  Richard  Stallman,
       and Len Tower.

       Report bugs to:
       GNU diffutils home page: <>
       General help using GNU software: <>

       Copyright  ©  2011  Free Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or later <>.
       This is free software: you are free  to  change  and  redistribute  it.
       There is NO WARRANTY, to the extent permitted by law.

       wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)

       The  full documentation for 1mdiff 22mis maintained as a Texinfo manual.  If
       the 1minfo 22mand 1mdiff 22mprograms are properly installed  at  your  site,  the

              1minfo diff0m

       should give you access to the complete manual.

diffutils 3.3                     March 2013                           DIFF(1)


#4 2013-09-16 16:50:00

From: Germany, NRW, Heiligenhaus
Registered: 2011-07-03
Posts: 283

Re: [SOLVED] @@ +35,7 -35,8 @@ In English Please

Hi dougchug,

you are right and you're not. diff manpage indeed is some kind of brief regarding this topic, but please find more detailed information on the diffutils homepage at by following this link.
Please note that this is no dispatch-conf related syntax. It is from the diffutils, dispatch-conf uses to print those outputs.


Board footer

Powered by FluxBB