You can use diff -W or –width=NUM options to output at most NUM (default 130) print columns. This option is used with –side-by-side option to define the maximum column width.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
## Control the width of column in side by side option echo -e "1\n2\n3\n4" > myfile1 ## create some files echo -e "1\n2\n4\n6\n5" > myfile2 diff --side-by-side --width=10 myfile1 myfile2 ## displays the output in two cloumns with column width=10. ## returns ## 1 1 ## 2 2 ## 3 < ## 4 4 ## > 6 ## > 5 diff --side-by-side myfile1 myfile2 ## output without the --width option ## returns ## 1 ## 1 ## 2 ## 2 ## 3 ## < ## 4 ## 4 ## ## > 6 ## ## > 5 |