I don't seem to find a way around this. Is there a one-liner to get only the right side of a diff --side-by-side output?
For example:
For this: diff --side-by-side file1 file2 I get either of this two types of results:
2 Africa | 3 Africa
3 America 3 America
3 Asia 3 Asia
4 Antarctica 4 Antarctica
4 Oceania 4 Oceania
7 Europe 7 Europe
or
3 Africa 3 Africa
3 America 3 America
3 Asia <
4 Antarctica 4 Antarctica
> 4 Asia
4 Oceania 4 Oceania
8 Europe 8 Europe
How can I turn those into this:
| 3 Africa
3 America
3 Asia
4 Antarctica
4 Oceania
7 Europe
And this respectively:
3 Africa
3 America
4 Antarctica
> 4 Asia
4 Oceania
8 Europe
Note that I edited the original output of diff so that it appears justified in this question. They appear aligned (column-wise) in the terminal but I had to adjust them a little bit here so they appear exactly as they appear in the terminal (columns neatly aligned), but you can replicate the output creating this input files:
File1 version 1
2 Africa
3 America
3 Asia
4 Antarctica
4 Oceania
7 Europe
File2 version 1
3 Africa
3 America
3 Asia
4 Antarctica
4 Oceania
7 Europe
File1 version 2
3 Africa
3 America
3 Asia
4 Antarctica
4 Oceania
8 Europe
File2 version 2
3 Africa
3 America
4 Antarctica
4 Asia
4 Oceania
8 Europe