🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #63276

diff usage question

#63276
From: RobertsD
Date: Mon, 27 Feb 1995 14:50
39 lines
1417 bytes
I want to use diff to produce output that must be in the standard ed format.
I also want to force it to only recognise that a match is found if
a certain number (say 3) lines have been found to match.

I thought that the -context flag might do it, but this produces 
the wrong output.

The sort of thing I need would produce the following:

1	A	A
2	B	B
3	C	X
4	D	Y
5	E	E
6	F	Z
7	G	G
8	H	H
9	I	I

Output produced should be:

3,4c3,4
< C
< D
< E
< F
---
> X
> Y
> E
> Z


I guess this is trying to reduce the number of difference 'hunks' 
rather than reducing the size of the hunks, which is what diff 
tries to do.

The output format is important because we have a program that uses 
diff and reads the output.
Technical Details
Message-ID: <D4nyKA.7uL@carmen.logica.co.uk>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!swrinde!pipex!logica.co.uk!news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,38eada1017f840d1,start
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1995-02-27 06:50:34 PST
Newsgroups: gnu.misc.discuss
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!swrinde!pipex!logica.co.uk!news
From: RobertsDE@lilhd.logica.co.uk (RobertsD)
Subject: diff usage question
Message-ID: <D4nyKA.7uL@carmen.logica.co.uk>
Sender: news@carmen.logica.co.uk (News Manager Account)
Nntp-Posting-Host: pc2207.logica.co.uk
Organization: Logica
X-Newsreader: WinVN 0.92.5
Date: Mon, 27 Feb 1995 14:50:34 GMT
Lines: 39