Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 25, 2022. It is now read-only.

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Outline

Diff Utility

This program is a minimal clone of the UNIX diff program.

diff.py takes two file names as command-line arguments and compares them for changes.

Prerequisites

  • Rich: rich==10.11.0

How to run the script

Running on Windows:

python diff.py <orignal_file> <changed_file>

Running on Linux / macOS:

./diff.py <orignal_file> <changed_file>

Usage Example

Consider two files v1 and v2:

v1:

Bruce
Alfred
Jason

v2:

Batman
Alfred
Red Hood
Joker
Ra's Al Ghul

On running ./diff.py v1 v2, you'll get the following output:


[-] Line 1: Bruce
[+] Line 1: Batman

[-] Line 3: Jason
[+] Line 3: Red Hood

[+] Line 4: Joker

[+] Line 5: Ra's Al Ghul

Screenshot

Python Diff Utility

KILLinefficiency

Github Link: KILLinefficiency

Morty Proxy This is a proxified and sanitized view of the page, visit original site.