1*228e906dStedu.\" $Id: sdiff.1,v 1.1 2005/12/27 04:04:56 tedu Exp $ 2*228e906dStedu.\" 3*228e906dStedu.\" Written by Raymond Lai <ray@cyth.net>. 4*228e906dStedu.\" Public domain. 5*228e906dStedu.\" 6*228e906dStedu.Dd October 29, 2005 7*228e906dStedu.Dt SDIFF 1 8*228e906dStedu.Os 9*228e906dStedu.Sh NAME 10*228e906dStedu.Nm sdiff 11*228e906dStedu.Nd side-by-side diff 12*228e906dStedu.Sh SYNOPSIS 13*228e906dStedu.Nm 14*228e906dStedu.Op Fl abDdilstW 15*228e906dStedu.Op Fl I Ar regexp 16*228e906dStedu.Op Fl o Ar outfile 17*228e906dStedu.Op Fl w Ar width 18*228e906dStedu.Ar file1 19*228e906dStedu.Ar file2 20*228e906dStedu.Sh DESCRIPTION 21*228e906dSteduShows a side-by-side comparison of two files. 22*228e906dStedu.Pp 23*228e906dSteduThe options are: 24*228e906dStedu.Bl -tag -width Ds 25*228e906dStedu.It Fl l 26*228e906dSteduOnly print left column for identical lines. 27*228e906dStedu.It Fl o Ar outfile 28*228e906dSteduInteractively merge 29*228e906dStedu.Ar file1 30*228e906dSteduand 31*228e906dStedu.Ar file2 32*228e906dSteduinto 33*228e906dStedu.Ar outfile . 34*228e906dSteduIn this mode, the user is prompted for each set of differences. 35*228e906dStedu.Pp 36*228e906dSteduThe commands are: 37*228e906dStedu.Bl -tag -width Ds 38*228e906dStedu.It Cm l 39*228e906dSteduChoose left set of diffs. 40*228e906dStedu.It Cm r 41*228e906dSteduChoose right set of diffs. 42*228e906dStedu.It Cm s 43*228e906dSteduSilent mode \(en identical lines are not printed. 44*228e906dStedu.It Cm v 45*228e906dSteduVerbose mode \(en identical lines are printed. 46*228e906dStedu.It Cm e 47*228e906dSteduStart editing an empty file, which will be merged into 48*228e906dStedu.Ar outfile 49*228e906dSteduupon exiting the editor. 50*228e906dStedu.It Cm e Cm l 51*228e906dSteduStart editing file with left set of diffs. 52*228e906dStedu.It Cm e Cm r 53*228e906dSteduStart editing file with right set of diffs. 54*228e906dStedu.It Cm e Cm b 55*228e906dSteduStart editing file with both sets of diffs. 56*228e906dStedu.It Cm q 57*228e906dSteduQuit 58*228e906dStedu.Nm . 59*228e906dStedu.El 60*228e906dStedu.It Fl s 61*228e906dSteduSkip identical lines. 62*228e906dStedu.It Fl D 63*228e906dSteduDebug mode. 64*228e906dSteduVerifies whenever possible. 65*228e906dSteduUsed to test how well 66*228e906dStedu.Nm 67*228e906dSteduworks with various 68*228e906dStedu.Xr diff 1 69*228e906dSteduimplementations. 70*228e906dStedu.It Fl w Ar width 71*228e906dSteduPrint a maximum of 72*228e906dStedu.Ar width 73*228e906dSteducharacters on each line. 74*228e906dSteduThe default is 130 characters. 75*228e906dStedu.El 76*228e906dStedu.Pp 77*228e906dSteduOptions passed to 78*228e906dStedu.Xr diff 1 79*228e906dSteduare: 80*228e906dStedu.Bl -tag -width Ds 81*228e906dStedu.It Fl a 82*228e906dSteduTreat 83*228e906dStedu.Ar file1 84*228e906dSteduand 85*228e906dStedu.Ar file2 86*228e906dSteduas text files. 87*228e906dStedu.It Fl b 88*228e906dSteduIgnore trailing blank spaces. 89*228e906dStedu.It Fl d 90*228e906dSteduMinimize diff size. 91*228e906dStedu.It Fl I Ar regexp 92*228e906dSteduIgnore line changes matching 93*228e906dStedu.Ar regexp . 94*228e906dStedu.It Fl i 95*228e906dSteduDo a case-insensitive comparison. 96*228e906dStedu.It Fl t 97*228e906dSteduExpand tabs to spaces. 98*228e906dStedu.It Fl W 99*228e906dSteduIgnore all spaces. 100*228e906dStedu(The 101*228e906dStedu.Fl w 102*228e906dSteduflag is passed to 103*228e906dStedu.Xr diff 1 .) 104*228e906dStedu.El 105*228e906dStedu.Sh CAVEATS 106*228e906dSteduAlthough undocumented, 107*228e906dStedu.Nm 108*228e906dStedusupports all options supported by GNU sdiff. 109*228e906dSteduSome options require GNU diff. 110*228e906dStedu.Pp 111*228e906dSteduTabs are treated as anywhere from one to eight characters wide, 112*228e906dStedudepending on the current column. 113*228e906dSteduTerminals that treat tabs as eight characters wide will look best. 114*228e906dStedu.Sh AUTHORS 115*228e906dStedu.Nm 116*228e906dSteduwas written from scratch for the public domain by 117*228e906dStedu.An Ray Lai Aq ray@cyth.net . 118