[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

To grok grep output....



Hi all -

  I just need to completely understand grep output before I can finish a
project I'm working on right now. I was wondering if someone could give me
an explination of unified diff output syntax.

I know that it's context based, and that a + signals an addition while -
means the reverse. However, the hunk headers confuse me. From patch-2.2.12,
what does the following segment mean:

diff -u --recursive --new-file v2.2.11/linux/CREDITS linux/CREDITS
--- v2.2.11/linux/CREDITS       Mon Aug  9 16:05:54 1999
+++ linux/CREDITS       Wed Aug 25 17:29:45 1999
@@ -689,14 +689,11 @@

The first line looks like the syntax diff was called with. The second should
be the name of the original file, while the third should be the new file.
however, the last line confuses me; it looks like it should be some kind of
line offset info, outlining where this hunk started in the old file. is the
second pair of numbers specific to the new version of the file in some way?

Please help me out by explaining, you will be my new hero ;)

-- 
..Aaron Van Couwenberghe... ..vanco@sonic.net.. ..aaronv@debian.org....
        Berlin:                 http://www.berlin-consortium.org
        Debian GNU/Linux:       http://www.debian.org


Reply to: