Skip to content

🟥🟩 diff command implemented using Edit-Distance Algorithm

Notifications You must be signed in to change notification settings

TanmayPatil105/diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This is a program to mimic the working of the Unix command diff used to display the differences in the files by comparing the files line by line. (implementation in C)

Refer : diff command

Note

  • Max Characters per line : 128
  • Max Lines per file : 128

Executing the program

To make the makefile

make

To execute the program

./diff <file1_name> <file2_name> [options]

For Example

./diff file1.txt file2.txt

Output

Screenshot from 2022-05-31 17-59-01 Screenshot from 2022-05-31 17-56-21

Time taken

The time taken by the program to compare files is less than that of the diff command for files of small sizes and nearly the same for files of large size Screenshot from 2022-05-31 18-00-18

Different ways to view diff command

./diff <file1_name> <file2_name> --normal image

./diff <file1_name> <file2_name> --color image

./diff <file1_name> <file2_name> -s ./diff <file1_name> <file2_name> -q image

./diff <file1_name> <file2_name> -u image

./diff <file1_name> <file2_name> -c image

About

🟥🟩 diff command implemented using Edit-Distance Algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published