How to display only different rows using diff (bash)

a.txt: 1;john;125;3 1;tom;56;2 2;jack;10;5 b.txt: 1;john;125;3 1;tom;58;2 2;jack;10;5 Use comm: comm -13 a.txt b.txt 1;tom;58;2 The command line options to comm are pretty straight-forward: -1 suppress column 1 (lines unique to FILE1) -2 suppress column 2 (lines unique to FILE2) -3 suppress column 3 (lines that appear in both files)

Is there any way to generate a diff between two versions of an IPython notebook?

Notebook diff can be generated with nbdime. After installing nbdime you can run following to see notebook diff in browser: > nbdiff-web notebook_1.ipynb notebook_2.ipynb If you are using Github for version control you can use ReviewNB for Notebook diff. It lets you login via Github and browse commits/pull-request diff on your repo. You’ll see visual … Read more

How does a ‘diff’ algorithm work, e.g. in VCDIFF and DiffMerge? [closed]

An O(ND) Difference Algorithm and its Variations (1986, Eugene W. Myers) is a fantastic paper and you may want to start there. It includes pseudo-code and a nice visualization of the graph traversals involved in doing the diff. Section 4 of the paper introduces some refinements to the algorithm that make it very effective. Successfully … Read more

How to read patch .rej files

A simple example: $ echo -e “line 1\nline 2\nline 3” > a $ sed -e ‘s/2/b/’ <a >b $ sed -e ‘s/2/c/’ <a >c $ diff a b > ab.diff $ patch c < ab.diff $ cat c.rej *************** *** 2 – line 2 — 2 —– + line b As you can see: The … Read more

diff branch changes in git relative to common ancestor

After extensively looking at git help rev-parse and experimenting around, I found this piece of information: <rev1>..<rev2> Include commits that are reachable from <rev2> but exclude those that are reachable from <rev1>. When either <rev1> or <rev2> is omitted, it defaults to HEAD. <rev1>…<rev2> Include commits that are reachable from either <rev1> or <rev2> but … Read more

Setting up and using Meld as your git difftool and mergetool on a Mac

Download the latest .dmg package for Mac from here: Meld for OSX Set meld as your git difftool/mergetool by editing your ~/.gitconfig and adding the following lines, as mentioned in the above link: [diff] tool = meld [difftool] prompt = false [difftool “meld”] trustExitCode = true cmd = open -W -a Meld –args \”$LOCAL\” \”$PWD/$REMOTE\” … Read more