![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trying to implement case | ssunda6 | Shell Programming and Scripting | 2 | 03-21-2008 03:55 AM |
| how to implement this | kishore_jasthi | Shell Programming and Scripting | 2 | 02-22-2008 02:11 AM |
| how to implement timer | Frank2004 | AIX | 2 | 06-09-2004 06:21 PM |
| how can i implement rlogin | jav_v | UNIX for Advanced & Expert Users | 3 | 08-29-2002 02:26 PM |
| diff 2 files; output diff's to 3rd file | blt123 | Shell Programming and Scripting | 2 | 05-28-2002 08:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Does someone know how Unix or Linux implement
'diff' command ? Any good reference or the algorithm will be better ? Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Well, I assumed you read the man page...
man diff ...otherwise, read... http://unixhelp.ed.ac.uk/CGI/man-cgi?diff For example: File1 1col_1,1col_2,1col_3,1col_4,1col5 2col_1,2col_2,2col_3,2col_4,2col5 3col_1,3col_2,3col_3,3col_4,3col5 4col_1,4col_2,4col_3,4col_4,4col5 5col_1,5col_2,5col_3,5col_4,5col5 File2 1col_1,1col_2,1col_3,1col_4,1col5 2col_1,2col_2,2col_3,2col_4,2col5 0col_1,3col_2,3col_3,3col_4,3col5 4col_1,4col_2,4col_3,4col_4,4col5 5col_1,0col_2,5col_3,5col_4,5col5 diff File1 File2 3c3 < 3col_1,3col_2,3col_3,3col_4,3col5 --- > 0col_1,3col_2,3col_3,3col_4,3col5 5c5 < 5col_1,5col_2,5col_3,5col_4,5col5 --- > 5col_1,0col_2,5col_3,5col_4,5col5 ...lines starting with "<" belong to the first file (File1). lines starting with ">" belong to the second file (File2). Is there somthing specific you are trying to do with diff? |
|
#3
|
|||
|
|||
|
Thank you so much.
Because currently we have two programmers working on one file. I am just wondering how to combine their work daily. And I know in CVS they use 'diff' to compare different version's file. Or maybe you have any good suggestions? Thanks |
|
#4
|
||||
|
||||
|
Normally, CVS can be used to "check out for edit" source modules
and prevent (in an advisory manner) more than 1 person from making changes to a single module at the same time. This way, changes made by one person can safely be made are are sure to be in the "check out for edit" by the next person. If it is necessary to have more than one person working on the same source module (and in some cases it is - but rarely) you can utilize the CVS "merge" function to merge the changes from both files into one. May I suggest your developers familiarize themselves with the CVS docs... http://www.gnu.org/manual/cvs/index.html ...it will benifit them greatly. The CVS "diff" and UNIX "diff" are two different things. I was describing the UNIX command diff(1). |
||||
| Google The UNIX and Linux Forums |