You are not logged in.

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

dougchug
Member
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: http://www.gentoo-wiki.info/Dispatch-conf

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.

Offline

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

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

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

man diff

Offline

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

dougchug
Member
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)



1mNAME0m
       diff - compare files line by line

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

1mDESCRIPTION0m
       Compare FILES line by line.

       Mandatory  arguments  to  long  options are mandatory for short options
       too.

       1m--normal0m
              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

       1m--left-column0m
              output only the left column of common lines

       1m--suppress-common-lines0m
              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

       1m--tabsize22m=4mNUM0m
              tab stops every NUM (default 8) print columns

       1m--suppress-blank-empty0m
              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

       1m--unidirectional-new-file0m
              treat absent first files as empty

       1m--ignore-file-name-case0m
              ignore case when comparing file names

       1m--no-ignore-file-name-case0m
              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

       1m--from-file22m=4mFILE10m
              compare FILE1 to all operands; FILE1 can be a directory

       1m--to-file22m=4mFILE20m
              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

       1m--strip-trailing-cr0m
              strip trailing carriage return on input

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

       1m--GTYPE-group-format22m=4mGFMT0m
              format GTYPE input groups with GFMT

       1m--line-format22m=4mLFMT0m
              format all input lines with LFMT

       1m--LTYPE-line-format22m=4mLFMT0m
              format LTYPE input lines with LFMT

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

              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

       %[-][WIDTH][.[PREC]]{doxX}LETTER
              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

       %(A=B?T:E)
              if A equals B then T else E

              LFMT (only) may contain:

       %L     contents of line

       %l     contents of line, excluding any trailing newline

       %[-][WIDTH][.[PREC]]{doxX}n
              printf-style spec for input line number

              Both GFMT and LFMT may contain:

       %%     %

       %c'C'  the single character C

       %c'\OOO'
              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

       1m--horizon-lines22m=4mNUM0m
              keep NUM lines of the common prefix and suffix

       1m--speed-large-files0m
              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.

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

1mREPORTING BUGS0m
       Report bugs to: bug-diffutils@gnu.org
       GNU diffutils home page: <http://www.gnu.org/software/diffutils/>
       General help using GNU software: <http://www.gnu.org/gethelp/>

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

1mSEE ALSO0m
       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
       command

              1minfo diff0m

       should give you access to the complete manual.



diffutils 3.3                     March 2013                           DIFF(1)

Offline

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

Judge
Staff
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 gnu.org 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.

Offline

Board footer

Powered by FluxBB